cf 1.0.0-beta.17 → 1.0.0-beta.19

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 (319) hide show
  1. package/README.md +7 -0
  2. package/dist/_meta/commands.json +9122 -6086
  3. package/dist/_meta/hand-written-commands.json +6 -0
  4. package/dist/_meta/schemas.json +8392 -5576
  5. package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-DhgunVFo.mjs} +6 -6
  6. package/dist/{access-DnWW2AAT.mjs → access-BDoDq_WZ.mjs} +1 -1
  7. package/dist/{accounts-8UcHNm3S.mjs → accounts-DLTCzZJg.mjs} +17 -13
  8. package/dist/{acm-qRM3iy4Z.mjs → acm-DS1CosYq.mjs} +1 -1
  9. package/dist/{addressing-CAb8z2Dq.mjs → addressing-DFeYj8TY.mjs} +19 -19
  10. package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-DXjQ8N0g.mjs} +6 -6
  11. package/dist/{ai-DnhytGdc.mjs → ai-V5YopMkS.mjs} +4 -4
  12. package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-yg8D0azz.mjs} +2 -2
  13. package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway--dkH9qGz.mjs} +42 -42
  14. package/dist/ai-search-BRtsUaUI.mjs +79 -0
  15. package/dist/{ai-security-KUs94UW-.mjs → ai-security-DRJCcLpF.mjs} +5 -5
  16. package/dist/{alerting-CCmyEPzN.mjs → alerting-8DsyMKGG.mjs} +30 -30
  17. package/dist/{analytics-BAvBj6qx.mjs → analytics-BpYUZTtQ.mjs} +7 -7
  18. package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
  19. package/dist/{api-security-BItVQymb.mjs → api-security-CBhWZE8z.mjs} +26 -26
  20. package/dist/{argo-DsJCvfml.mjs → argo-B0u2N3Dh.mjs} +1 -1
  21. package/dist/{artifacts-DzHXeah6.mjs → artifacts-B6XzjMiM.mjs} +1 -1
  22. package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-59fCc1aw.mjs} +1 -1
  23. package/dist/auth-5cgi8ePZ.mjs +2 -0
  24. package/dist/auth-BaUNb1Ed.mjs +2 -0
  25. package/dist/auth-ChYOc_rS.mjs +2 -0
  26. package/dist/{auth-token-Cw4c0y89.mjs → auth-token-B1pP2jaK.mjs} +1 -1
  27. package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
  28. package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
  29. package/dist/{billing-COgAWTYh.mjs → billing-Ad-rK-JH.mjs} +6 -6
  30. package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
  31. package/dist/body-parser-ChnyBsfm.mjs +2 -0
  32. package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CGpfjQ4w.mjs} +4 -4
  33. package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
  34. package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-CP73_yX8.mjs} +5 -5
  35. package/dist/browser-run-OpUfawh_.mjs +42 -0
  36. package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
  37. package/dist/build-DQZ2w_dQ.mjs +2 -0
  38. package/dist/builds-DsRNlILV.mjs +71 -0
  39. package/dist/{cache-BUh85NRr.mjs → cache-RppXjxXA.mjs} +3 -3
  40. package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
  41. package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
  42. package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
  43. package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
  44. package/dist/{cli-DJhpXf38.mjs → cli-Dd1n2YAJ.mjs} +1 -1
  45. package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
  46. package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
  47. package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
  48. package/dist/cloudforce-one-C1xdpspb.mjs +395 -0
  49. package/dist/{command-RC9WM5jq.mjs → command-BioiZMm9.mjs} +1 -1
  50. package/dist/{command-rx0Kb5pn.mjs → command-C0nJ2LRd.mjs} +1 -1
  51. package/dist/{command-CiApsRql.mjs → command-C5ARgURy.mjs} +1 -1
  52. package/dist/{command-CCq-Z2Ua.mjs → command-C7NIRU-u.mjs} +1 -1
  53. package/dist/{command-B694oLDo.mjs → command-C8DV-x_C.mjs} +1 -1
  54. package/dist/{command-Bmee6uwe.mjs → command-CFV1cqfR.mjs} +1 -1
  55. package/dist/{command-CbQFbfps.mjs → command-ChQXv0jP.mjs} +1 -1
  56. package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
  57. package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
  58. package/dist/{command-CAs3SxlI.mjs → command-DWE7YdeC.mjs} +1 -1
  59. package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
  60. package/dist/{command-D1JR8Fb7.mjs → command-DmPQXNRg.mjs} +1 -1
  61. package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
  62. package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
  63. package/dist/{command-DerHAjQL.mjs → command-yAXk5NXh.mjs} +1 -1
  64. package/dist/{completions-11latun5.mjs → completions-Bh0Hz-hA.mjs} +3 -3
  65. package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
  68. package/dist/{connectors-DXIUG4Zi.mjs → connectors-RUEU1QDB.mjs} +1 -1
  69. package/dist/containers-xU-0EhLO.mjs +78 -0
  70. package/dist/{containers-WMWKhLkp.mjs → containers-yUOvm-4V.mjs} +211 -211
  71. package/dist/{content-scan-CRDmR7rD.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
  72. package/dist/{context-q-6bMSL-.mjs → context-BQ6KeMgq.mjs} +2 -2
  73. package/dist/cps-CgPduy0H.mjs +6 -0
  74. package/dist/csam-scanner-B0Ra6fXL.mjs +10 -0
  75. package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
  76. package/dist/custom-hostnames-Dzov_CPw.mjs +27 -0
  77. package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
  78. package/dist/custom-pages-DxVD_f10.mjs +21 -0
  79. package/dist/{d1-Dbs8HItA.mjs → d1-D7p4uJ-e.mjs} +17 -19
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-5utIiOMN.mjs → deploy-BjWvVZol.mjs} +1 -1
  82. package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
  83. package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
  84. package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
  85. package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-DdhTemYB.mjs} +2 -2
  86. package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
  87. package/dist/discover-DEjUARkU.mjs +2 -0
  88. package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
  89. package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
  90. package/dist/{dls-lbM3i4x-.mjs → dls-BBODA9Rk.mjs} +1 -1
  91. package/dist/{dns-QTMPGYMa.mjs → dns-CK_hyn5q.mjs} +22 -22
  92. package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DbvX9R-7.mjs} +9 -9
  93. package/dist/{docs-bV3hPwQL.mjs → docs-BDTijwM3.mjs} +1 -1
  94. package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
  95. package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
  96. package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
  97. package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
  98. package/dist/{email-auth-PzRqG0ex.mjs → email-auth-BEgDxU-g.mjs} +1 -1
  99. package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-DKWmPOVo.mjs} +13 -13
  100. package/dist/{email-security-CSTKIecn.mjs → email-security-RWbAp8qa.mjs} +44 -44
  101. package/dist/{email-sending-BSwuAir8.mjs → email-sending-BbJy_vl8.mjs} +18 -18
  102. package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
  103. package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
  104. package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-Bob6udAc.mjs} +2 -2
  105. package/dist/{firewall-BsZxVitA.mjs → firewall-DziiEsR8.mjs} +20 -20
  106. package/dist/{flagship-qBohOZaM.mjs → flagship-xOtgddUK.mjs} +11 -11
  107. package/dist/{fraud-vGNdrSm-.mjs → fraud-BUS7i5Yh.mjs} +1 -1
  108. package/dist/generate-D6V4Q58z.mjs +2 -0
  109. package/dist/get-BTisquA3.mjs +2 -0
  110. package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
  111. package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
  112. package/dist/healthchecks-CbD2PsnM.mjs +22 -0
  113. package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
  114. package/dist/{iam-Dl_n_Lqq.mjs → iam-DvsCztqU.mjs} +9 -9
  115. package/dist/{images-vMtXk2Rf.mjs → images-BipVjHNw.mjs} +37 -37
  116. package/dist/index.mjs +1 -1
  117. package/dist/init-LvFgCsNX.mjs +43 -0
  118. package/dist/{intel-Bq4GGXv-.mjs → intel-D1LPkkBM.mjs} +31 -41
  119. package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
  120. package/dist/interactive-pjVqirHx.mjs +2 -0
  121. package/dist/{ips-BcvZS46g.mjs → ips-2iUGs8ws.mjs} +1 -1
  122. package/dist/{k2-DL4hrVTj.mjs → k2-DGzRm3NJ.mjs} +2 -2
  123. package/dist/{kv-BLo9wMgb.mjs → kv-BW-s9MJY.mjs} +4 -4
  124. package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
  125. package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
  126. package/dist/load-balancers-CtnusAzP.mjs +76 -0
  127. package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
  128. package/dist/local-DCnFIgLJ.mjs +2 -0
  129. package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
  130. package/dist/login-CqZJgUF1.mjs +5 -0
  131. package/dist/{login-Du_W6b9o.mjs → login-DR60WiAY.mjs} +1 -1
  132. package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
  133. package/dist/{logos-BuhvSu_H.mjs → logos-Yzhd-VKb.mjs} +2 -2
  134. package/dist/logpush-JYG4gXZ-.mjs +46 -0
  135. package/dist/{logs-CaKOk-1v.mjs → logs-DLblEjK0.mjs} +3 -3
  136. package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
  137. package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-D2px4Ep4.mjs} +9 -9
  138. package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-Bnwsi0UQ.mjs} +170 -170
  139. package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-CTtNoxzW.mjs} +9 -9
  140. package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-B92mJi5i.mjs} +2 -2
  141. package/dist/{matches-DkLSWb5X.mjs → matches-CzbL1XD-.mjs} +1 -1
  142. package/dist/{mcp-BcV1XqE8.mjs → mcp-Cic_aMer.mjs} +10 -10
  143. package/dist/{mesh-CSSlZ-0F.mjs → mesh-DZTgD16C.mjs} +14 -14
  144. package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
  145. package/dist/{monetization-B-nJ0SyI.mjs → monetization-DCQ2_niU.mjs} +4 -4
  146. package/dist/{network-ZzxQ_Dcz.mjs → network-BqMqD2qn.mjs} +27 -25
  147. package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
  148. package/dist/o11y-CS5q1vSh.mjs +93 -0
  149. package/dist/oauth-DPLYUvRl.mjs +2 -0
  150. package/dist/oauth-DdYSPYoE.mjs +4 -0
  151. package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
  152. package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
  153. package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
  154. package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
  155. package/dist/organization-DFRN2g6z.mjs +75 -0
  156. package/dist/{organizations-CcgZPmFl.mjs → organizations-yiGopnKf.mjs} +1 -1
  157. package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
  158. package/dist/output-O6b9MR9R.mjs +2 -0
  159. package/dist/{page-rules-DFfqfllI.mjs → page-rules-F1Jdxx6A.mjs} +4 -4
  160. package/dist/pages-CezC0YrR.mjs +54 -0
  161. package/dist/pay-per-crawl-fZ-kTBbN.mjs +38 -0
  162. package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-B14BTKVI.mjs} +8 -8
  163. package/dist/pipelines-BN7ydBHl.mjs +44 -0
  164. package/dist/precursor-B88RDDZT.mjs +4 -0
  165. package/dist/previews-CiqRIq_k.mjs +7 -0
  166. package/dist/process-DiXf4VPi.mjs +2 -0
  167. package/dist/{progress-DaQ4MzBI.mjs → progress-CdlDthXA.mjs} +1 -1
  168. package/dist/{prompt-KWYZvJWM.mjs → prompt-1AC-qwxS.mjs} +1 -1
  169. package/dist/{queries-DoyhspQf.mjs → queries-C2sgUI9j.mjs} +3 -3
  170. package/dist/{queues-BPxTU2rU.mjs → queues-DCP5x-PZ.mjs} +17 -17
  171. package/dist/{r2-CQt4S7o7.mjs → r2-D7UhzWR7.mjs} +21 -21
  172. package/dist/{radar-CALpR1vq.mjs → radar-osOiFeY_.mjs} +1 -1
  173. package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
  174. package/dist/{realtime-BiHKBoI4.mjs → realtime-DCnqxiWo.mjs} +90 -87
  175. package/dist/registrar-DAFYjjRa.mjs +43 -0
  176. package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-zeNHABZ0.mjs} +11 -9
  177. package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
  178. package/dist/{reporting-8aRJD5HX.mjs → reporting-KehV_PXm.mjs} +1 -1
  179. package/dist/{request-headers-CqfJOkpO.mjs → request-headers-ojAw3pQO.mjs} +1 -1
  180. package/dist/request-tracers-BStCgh6m.mjs +4 -0
  181. package/dist/resolve-BGNMAcGR.mjs +2 -0
  182. package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-3xtSgWG7.mjs} +19 -19
  183. package/dist/{rules-CFOuN3t2.mjs → rules-7F-G2Bg_.mjs} +6 -6
  184. package/dist/{rulesets-DkhV2Hny.mjs → rulesets-B0YtS2br.mjs} +20 -20
  185. package/dist/{rum-BnMW0Tlb.mjs → rum-B3V6tqS-.mjs} +6 -6
  186. package/dist/{run-Clc3P2u7.mjs → run-B_07PrkW.mjs} +1 -1
  187. package/dist/run-D6AJfZT-.mjs +2 -0
  188. package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
  189. package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
  190. package/dist/{scim-tvZm6A-r.mjs → scim-CQ9TdajH.mjs} +6 -6
  191. package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
  192. package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-BsLMdo1r.mjs} +2 -2
  193. package/dist/{security-txt-D4pRk7-w.mjs → security-txt-pCAiHvys.mjs} +1 -1
  194. package/dist/session-BsNzFtPi.mjs +2 -0
  195. package/dist/shared-CWBjMZDR.mjs +2 -0
  196. package/dist/smart-shield-BTXQsVxz.mjs +24 -0
  197. package/dist/{snippets-BIcZ6vSW.mjs → snippets-CYVieyc3.mjs} +3 -3
  198. package/dist/source-AlTrHNem.mjs +6 -0
  199. package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
  200. package/dist/{spectrum-DjDX0geK.mjs → spectrum-DLRr4Q03.mjs} +14 -14
  201. package/dist/{speed-DiPoFJMm.mjs → speed-BJfaDYxz.mjs} +13 -13
  202. package/dist/sql-DQ4xrdc2.mjs +4 -0
  203. package/dist/src-BnMvFE3q.mjs +125 -0
  204. package/dist/ssl-CL1B69Pw.mjs +139 -0
  205. package/dist/startup-profile-DuaJFX1y.mjs +2 -0
  206. package/dist/startup-profile-HMblAiBi.mjs +29 -0
  207. package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
  208. package/dist/state-DePlO0Kv.mjs +2 -0
  209. package/dist/{stream-uhn_Zsni.mjs → stream-DrMZOO5u.mjs} +55 -55
  210. package/dist/{submit-C3suIDBX.mjs → submit-DjlLoVk2.mjs} +1 -1
  211. package/dist/tags-DY7Ur1k-.mjs +23 -0
  212. package/dist/{telemetry-DYjsavEr.mjs → telemetry-BG3kcYsV.mjs} +1 -1
  213. package/dist/telemetry-Dpm6GfZD.mjs +2 -0
  214. package/dist/{tenant-DK88yQM4.mjs → tenant-BEMfNMjO.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
  216. package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
  217. package/dist/tunnels-_JXe-UgM.mjs +29 -0
  218. package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DXEfneQq.mjs} +5 -5
  219. package/dist/ui-CY79jlGZ.mjs +2 -0
  220. package/dist/update-check-DfbYVefm.mjs +2 -0
  221. package/dist/{update-check-BhhtSXVZ.mjs → update-check-atcehhBC.mjs} +1 -1
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-a0mY4UsC.mjs → url-info-B1kL9asc.mjs} +1 -1
  224. package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
  225. package/dist/url-scanner-OnZP_-jm.mjs +16 -0
  226. package/dist/{user-DDH9lxf5.mjs → user-BBBuFNj4.mjs} +59 -59
  227. package/dist/{vectorize-DaT3amFV.mjs → vectorize-DcctB8bw.mjs} +17 -17
  228. package/dist/version-CLgSHoNm.mjs +2 -0
  229. package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-JaFE5wP1.mjs} +13 -13
  230. package/dist/{web-assets-NqNglLSI.mjs → web-assets-Cu0swUPe.mjs} +35 -35
  231. package/dist/{web3-UnCUuIfB.mjs → web3-C67z4OtQ.mjs} +6 -6
  232. package/dist/workers-ClTP0Ysl.mjs +43 -0
  233. package/dist/workers-builds-C5wKhvKe.mjs +14 -0
  234. package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-rxwkYyb3.mjs} +25 -22
  235. package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
  236. package/dist/{workflows-Dq-k81hU.mjs → workflows-COJ5jwvk.mjs} +24 -24
  237. package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
  238. package/dist/zaraz-BkZ7yW05.mjs +22 -0
  239. package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-lUFLYuL1.mjs} +509 -454
  240. package/dist/{zone-DcZIUTWt.mjs → zone-CC1_qxt-.mjs} +1 -1
  241. package/dist/{zones-BVdvYUCv.mjs → zones-BRiLlTmW.mjs} +45 -36
  242. package/package.json +14 -14
  243. package/dist/account-tags-zvHRQZxb.mjs +0 -15
  244. package/dist/ai-search-CtfW5fzl.mjs +0 -79
  245. package/dist/auth-C530fHKQ.mjs +0 -2
  246. package/dist/auth-Ccm5viK_.mjs +0 -2
  247. package/dist/auth-MNz2D-PD.mjs +0 -2
  248. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  249. package/dist/browser-run-ChXohmNG.mjs +0 -42
  250. package/dist/build-BRJnyeu8.mjs +0 -2
  251. package/dist/builds-DmEFTQTa.mjs +0 -71
  252. package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
  253. package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
  254. package/dist/client-certificates-B3UxH_Au.mjs +0 -13
  255. package/dist/cloudforce-one-DN5N3C3w.mjs +0 -405
  256. package/dist/containers-DCH6MFjY.mjs +0 -78
  257. package/dist/cps-Due0P5IW.mjs +0 -6
  258. package/dist/csam-scanner-DvLrPw45.mjs +0 -10
  259. package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
  260. package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
  261. package/dist/custom-hostnames-DI_dFaof.mjs +0 -27
  262. package/dist/custom-pages-ubava9Qm.mjs +0 -21
  263. package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
  264. package/dist/deploy-context-C0iVbWRG.mjs +0 -56
  265. package/dist/discover-DIDEGKo3.mjs +0 -2
  266. package/dist/error-sanitization-CIQOep3I.mjs +0 -2
  267. package/dist/generate-D80-1GnZ.mjs +0 -2
  268. package/dist/get-By1q8YlI.mjs +0 -2
  269. package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
  270. package/dist/hostnames-CLlaMqHu.mjs +0 -11
  271. package/dist/init-_7djeBVw.mjs +0 -43
  272. package/dist/interactive-DGUWZ2Gk.mjs +0 -2
  273. package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
  274. package/dist/keys-BSV5IXdU.mjs +0 -4
  275. package/dist/load-balancers-CCCWoQXv.mjs +0 -76
  276. package/dist/local-DxWDQDnG.mjs +0 -2
  277. package/dist/login-DT6Q1UJw.mjs +0 -5
  278. package/dist/logpush-DgZtF9vG.mjs +0 -46
  279. package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
  280. package/dist/o11y-LG6Y9LUZ.mjs +0 -93
  281. package/dist/oauth-Bx693Af5.mjs +0 -2
  282. package/dist/oauth-CP82E1_0.mjs +0 -4
  283. package/dist/organization-DMr_z6n4.mjs +0 -71
  284. package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
  285. package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
  286. package/dist/output-Co4xdFf6.mjs +0 -2
  287. package/dist/pages-BkcL5rC4.mjs +0 -54
  288. package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
  289. package/dist/pipelines-DUMIVwof.mjs +0 -44
  290. package/dist/precursor-DsGbA_YJ.mjs +0 -4
  291. package/dist/previews-Cma3-M7K.mjs +0 -7
  292. package/dist/process-2wmDCy17.mjs +0 -2
  293. package/dist/registrar-gERQ3b85.mjs +0 -43
  294. package/dist/request-tracers-DcnwQg3K.mjs +0 -4
  295. package/dist/resolve-BpgXeklt.mjs +0 -2
  296. package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
  297. package/dist/run-CHNyLZLG.mjs +0 -2
  298. package/dist/session-Cq3YNLoI.mjs +0 -2
  299. package/dist/shared-zePemxHi.mjs +0 -2
  300. package/dist/smart-shield-2egm1Vaw.mjs +0 -24
  301. package/dist/source-mXUcrTVw.mjs +0 -6
  302. package/dist/sql-DLjCt_R3.mjs +0 -4
  303. package/dist/src-CutrsNl4.mjs +0 -125
  304. package/dist/ssl-vNzK0c9S.mjs +0 -45
  305. package/dist/startup-profile-BOaseXnO.mjs +0 -29
  306. package/dist/startup-profile-BwEZFVGS.mjs +0 -2
  307. package/dist/state-CODDG9Nx.mjs +0 -2
  308. package/dist/tags-Dy2jG-Dt.mjs +0 -4
  309. package/dist/telemetry-Bdv5LZZs.mjs +0 -2
  310. package/dist/tunnels-DjbomhCa.mjs +0 -29
  311. package/dist/ui-BtIBQeaG.mjs +0 -2
  312. package/dist/update-check-Dld7rbLd.mjs +0 -2
  313. package/dist/url-scanner-D0egjBe5.mjs +0 -16
  314. package/dist/values-Bfr5-bL6.mjs +0 -4
  315. package/dist/version-CAuKDZAG.mjs +0 -2
  316. package/dist/workers-DfA9ugmb.mjs +0 -40
  317. package/dist/workers-builds-Cy6fdtm5.mjs +0 -14
  318. package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
  319. package/dist/zaraz-Dpr1pLDx.mjs +0 -22
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-KWYZvJWM.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`,body:`json`};function m(e){return e.usage(`$0 content-scan expressions create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-1AC-qwxS.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`,body:`json`};function m(e){return e.usage(`$0 content-scan expressions create
3
3
 
4
- Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example \`lookup_json_string(http.request.body.raw, "file")\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const h={command:`create`,describe:`Create Content Scanning custom expressions for a zone.`,builder:m,handler:async e=>o({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads/${t.expression_id}`};function _(e){return e.usage(`$0 content-scan expressions delete <expression-id>
4
+ Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example \`lookup_json_string(http.request.body.raw, "file")\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const h={command:`create`,describe:`Create Content Scanning custom expressions for a zone.`,builder:m,handler:async e=>o({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:c}));r(n,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads/${t.expression_id}`};function _(e){return e.usage(`$0 content-scan expressions delete <expression-id>
5
5
 
6
6
  Delete the Content Scanning custom expression with the given identifier and return the expressions that remain. Content objects reached only by the deleted expression are no longer scanned.`).positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,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 v={command:`delete <expression-id>`,describe:`Delete a Content Scanning custom expression from a zone.`,builder:_,handler:async e=>o({command:`content-scan expressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads/${e[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(e[`expression-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"expression-id":String(e[`expression-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force,message:`This operation deletes a Content Scanning custom expression.`})){process.stderr.write(`Aborted.
7
7
  `);return}let c=await a(`Deleting`,async()=>o.send(g,{zone_id:s,expression_id:e[`expression-id`]}));r(c,{successLabel:`Deleted`})})};var y={method:`GET`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`};function b(e){return e.usage(`$0 content-scan expressions list
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,r as t}from"./project-settings-nBMEx1f-.mjs";import{n}from"./resolve-C3FmNlSO.mjs";function r(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function i(n={}){let r=process.env.CLOUDFLARE_ACCOUNT_ID;if(r)return{value:r,source:`env`};if(n.skipProjectSettings)return;let i=t(void 0,n),a=i===void 0?await e(void 0,n):i;if(a?.settings?.accountId)return{value:a.settings.accountId,source:`settings`,path:a.path}}async function a(){let e=await i();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-Bx693Af5.mjs`);try{return t()}catch{return}}async function o(e){let t=await i(e);t&&s(t.value,g(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-Bx693Af5.mjs`);return n(t?.value,e)}function s(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function c(e,t,n){if(e?.zoneId)return l(e.zoneId,t);let i=r(`CLOUDFLARE_ZONE_ID`,e?.zone);if(i){if(!n?.quiet&&i.source!==`flag`){let e=g(i);console.error(`Using zone: ${i.value} (from ${e})`)}return l(i.value,t)}throw Error(`No zone specified.
2
+ import{i as e,r as t}from"./project-settings-nBMEx1f-.mjs";import{n}from"./resolve-C3FmNlSO.mjs";function r(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function i(n={}){let r=process.env.CLOUDFLARE_ACCOUNT_ID;if(r)return{value:r,source:`env`};if(n.skipProjectSettings)return;let i=t(void 0,n),a=i===void 0?await e(void 0,n):i;if(a?.settings?.accountId)return{value:a.settings.accountId,source:`settings`,path:a.path}}async function a(){let e=await i();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-DPLYUvRl.mjs`);try{return t()}catch{return}}async function o(e){let t=await i(e);t&&s(t.value,g(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-DPLYUvRl.mjs`);return n(t?.value,e)}function s(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function c(e,t,n){if(e?.zoneId)return l(e.zoneId,t);let i=r(`CLOUDFLARE_ZONE_ID`,e?.zone);if(i){if(!n?.quiet&&i.source!==`flag`){let e=g(i);console.error(`Using zone: ${i.value} (from ${e})`)}return l(i.value,t)}throw Error(`No zone specified.
3
3
 
4
4
  Please provide one of the following:
5
5
  1. Zone as a positional argument: cf dns records list <zone>
6
6
  2. --zone flag (or -z): cf dns records list --zone example.com
7
- 3. CLOUDFLARE_ZONE_ID environment variable`)}async function l(e,t){if(n(e)||!t)return e;let{resolveZoneId:r}=await import(`./resolve-BpgXeklt.mjs`);return r(t,await o(),e)}function u(e){if(e?.scriptName)return e.scriptName;throw Error("Required Worker name missing. Please specify the Worker name with `--worker <name>`.")}const d=[`public`,`fedramp_high`];let f=!1;async function p(n={}){let r=t(void 0,n),i=(r===void 0?await e(void 0,n):r)?.settings?.complianceRegion,a=h(i,`cloudflare.config.ts`),o=process.env.CLOUDFLARE_COMPLIANCE_REGION,s=h(o,`CLOUDFLARE_COMPLIANCE_REGION`);return s?(a&&a!==s&&!f&&(f=!0,console.warn(`The compliance region was resolved to "${o}" from the \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable, which takes precedence over the configured value "${i}" in \`cloudflare.config.ts\`.`)),s):a}async function m(e){return await p(e)??`public`}function h(e,t){switch(e){case`fedramp-high`:return`fedramp_high`;case`fedramp_high`:case`public`:case void 0:return e;default:throw Error(`Invalid compliance region "${e}" from ${t}. Valid values are: ${d.join(`, `)}`)}}function g(e,t=`zone`){switch(e.source){case`flag`:return t===`zone`?`--zone flag`:`(flag)`;case`env`:return{accountId:`CLOUDFLARE_ACCOUNT_ID`,zone:`CLOUDFLARE_ZONE_ID`,complianceRegion:`CLOUDFLARE_COMPLIANCE_REGION`}[t];case`settings`:return`cloudflare.config.ts`}}export{a,c as i,m as n,u as r,o as t};
7
+ 3. CLOUDFLARE_ZONE_ID environment variable`)}async function l(e,t){if(n(e)||!t)return e;let{resolveZoneId:r}=await import(`./resolve-BGNMAcGR.mjs`);return r(t,await o(),e)}function u(e){if(e?.scriptName)return e.scriptName;throw Error("Required Worker name missing. Please specify the Worker name with `--worker <name>`.")}const d=[`public`,`fedramp_high`];let f=!1;async function p(n={}){let r=t(void 0,n),i=(r===void 0?await e(void 0,n):r)?.settings?.complianceRegion,a=h(i,`cloudflare.config.ts`),o=process.env.CLOUDFLARE_COMPLIANCE_REGION,s=h(o,`CLOUDFLARE_COMPLIANCE_REGION`);return s?(a&&a!==s&&!f&&(f=!0,console.warn(`The compliance region was resolved to "${o}" from the \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable, which takes precedence over the configured value "${i}" in \`cloudflare.config.ts\`.`)),s):a}async function m(e){return await p(e)??`public`}function h(e,t){switch(e){case`fedramp-high`:return`fedramp_high`;case`fedramp_high`:case`public`:case void 0:return e;default:throw Error(`Invalid compliance region "${e}" from ${t}. Valid values are: ${d.join(`, `)}`)}}function g(e,t=`zone`){switch(e.source){case`flag`:return t===`zone`?`--zone flag`:`(flag)`;case`env`:return{accountId:`CLOUDFLARE_ACCOUNT_ID`,zone:`CLOUDFLARE_ZONE_ID`,complianceRegion:`CLOUDFLARE_COMPLIANCE_REGION`}[t];case`settings`:return`cloudflare.config.ts`}}export{a,c as i,m as n,u as r,o as t};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./auth-BaUNb1Ed.mjs";import{t}from"./output-O6b9MR9R.mjs";import{t as n}from"./dry-run-DQmFkNK_.mjs";import{t as r}from"./progress-CdlDthXA.mjs";import{t as i}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as a,r as o,t as s}from"./body-parser-ChnyBsfm.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";var l={method:`GET`,path:()=>`/user/communication_preferences`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 cps get
3
+
4
+ Retrieve the communication preferences for the authenticated user, including email verification status, marketing subscription opt-in/opt-out state, and language locale. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get communication preferences`,builder:u,handler:async a=>i({command:`cps get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf cps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.send(l));t(o,{successLabel:`Loaded`})})};var f={method:`PUT`,path:()=>`/user/communication_preferences`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function p(e){return e.usage(`$0 cps update
5
+
6
+ Set one or more communication preferences for the authenticated user. Supply a map of preference keys to subscription states, and an optional language locale. This endpoint does not modify email verification settings. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`language-locale`,{type:`string`,description:`The user's preferred language locale for communications. If omitted, the language locale does not change.`,choices:[`en-US`,`es-ES`,`de-DE`,`fr-FR`,`it-IT`,`ja-JP`,`ko-KR`,`pt-BR`,`zh-CN`,`zh-TW`]}).coerce(`language-locale`,e=>c(e,`language-locale`,`text`)).option(`preferences`,{type:`string`,description:`Preference keys mapped to subscription states to update. Only the preferences in this map change; others remain unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating communication preferences. An email field in the payload is ignored; email verification state is managed separately, so the field is excluded from this schema.`})}const m={command:`update`,describe:`Update communication preferences`,builder:p,handler:async c=>i({command:`cps update`,classification:{safeFlags:[`language-locale`,`dry-run`]}},c,async()=>{if(c.dryRun){n({command:`cf cps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`json`,body:c.body===void 0?s({"language-locale":c[`language-locale`],preferences:o(c.preferences,`preferences`)},[[`preferences`]]):a(c.body)});return}let i=await e(c);if(c.body){let e=a(c.body),n=await r(`Updating`,async()=>i.send(f,{body:e}));t(n,{successLabel:`Updated`});return}let l=s({"language-locale":c[`language-locale`],preferences:o(c.preferences,`preferences`)},[[`preferences`]]),u=await r(`Updating`,async()=>i.send(f,{body:l}));t(u,{successLabel:`Updated`})})},h={command:`cps`,describe:`cps`,builder:e=>e.command(d).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,r as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function f(e){return e.usage(`$0 csam-scanner edit
3
+
4
+ Update the CSAM Scanner configuration for a zone. Allows enabling or disabling CSAM scanning, updating the notification email, and configuring scanning sources. When a new email is provided, email verification is triggered automatically. The \`enabled\` field is a toggle; the server may adjust it based on whether the notification email is verified. Returns 403 if the zone or account is locked by Trust & Safety.`).option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).coerce(`id`,e=>u(e,`id`,`text`)).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
5
+ email verification is triggered automatically.
6
+ `}).option(`value-enabled`,{type:`boolean`,description:`Whether CSAM scanning is enabled for this zone.`}).option(`value-resend-email`,{type:`boolean`,description:`Set to true to trigger re-sending the email verification.
7
+ Write-only; never appears in responses (omitted when false).
8
+ `}).option(`value-sources`,{type:`string`,description:`Map of scanning sources and their enabled state. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CSAM Scanner configuration. `})}const p={command:`edit`,describe:`Update CSAM Scanner setting`,builder:f,handler:async e=>o({command:`csam-scanner edit`,classification:{safeFlags:[`id`,`value-enabled`,`value-resend-email`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(d,{body:t,zone_id:f}));r(n,{successLabel:`Updated`});return}let p=l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]),m=await a(`Updating`,async()=>o.send(d,{body:p,zone_id:f}));r(m,{successLabel:`Updated`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 csam-scanner get
9
+
10
+ Retrieve the current CSAM Scanner configuration for a zone. The notification email is masked by default in responses.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Get CSAM Scanner setting`,builder:h,handler:async e=>o({command:`csam-scanner get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})},_={command:`csam-scanner`,describe:`csam-scanner`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-MNz2D-PD.mjs";import{a as r,i,t as a}from"./context-q-6bMSL-.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-DaQ4MzBI.mjs";import{t as l}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-KWYZvJWM.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,body:`json`};function g(e){return e.usage(`$0 custom-csrs create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,body:`json`};function g(e){return e.usage(`$0 custom-csrs create
3
3
 
4
4
  Generate a new custom Certificate Signing Request (CSR) for an account or zone. Cloudflare generates and securely stores the private key associated with the CSR.`).option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).coerce(`key-type`,e=>f(e,`key-type`,`text`)).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a custom CSR.`})}const _={command:`create`,describe:`Create Custom CSR`,builder:g,handler:async e=>l({command:`custom-csrs create`,classification:{safeFlags:[`key-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}if(e[`common-name`]===void 0&&(e[`common-name`]=await p(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),e.country===void 0&&(e.country=await p(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),e.locality===void 0&&(e.locality=await p(`locality`,`City or locality name.`)),e.organization===void 0&&(e.organization=await p(`organization`,`Organization name.`)),e.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);e.state===void 0&&(e.state=await p(`state`,`State or province name.`));let _=d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}),v=await c(`Creating`,async()=>l.send(h,{body:_,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs/${t.custom_csr_id}`};function y(e){return e.usage(`$0 custom-csrs delete <custom-csr-id>
5
5
 
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as s,n as c,r as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-1AC-qwxS.mjs";var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`};function h(e){return e.usage(`$0 custom-hostnames certificate-pack certificates delete <certificate-id>
3
+
4
+ Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,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 g={command:`delete <certificate-id>`,describe:`Delete Single Certificate And Key For Custom Hostname`,builder:h,handler:async e=>o({command:`custom-hostnames certificate-pack certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force})){process.stderr.write(`Aborted.
5
+ `);return}let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`,body:`json`};function v(e){return e.usage(`$0 custom-hostnames certificate-pack certificates update <certificate-id>
6
+
7
+ Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).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:`update <certificate-id>`,describe:`Replace Custom Certificate and Custom Key In Custom Hostname`,builder:v,handler:async e=>o({command:`custom-hostnames certificate-pack certificates update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}):c(e.body),sensitiveBodyPaths:[[`custom_key`]]});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(_,{body:t,zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(n,{successLabel:`Updated`});return}e[`custom-certificate`]===void 0&&(e[`custom-certificate`]=await f(`custom-certificate`,`If a custom uploaded certificate is used.`)),e[`custom-key`]===void 0&&(e[`custom-key`]=await f(`custom-key`,`The key for a custom uploaded certificate.`,{kind:`secret`}));let l=u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}),p=await a(`Updating`,async()=>o.send(_,{body:l,zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(p,{successLabel:`Updated`})})},b={command:`certificates`,describe:`Operations for certificate-pack.certificates`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`certificate-pack`,describe:`Operations for certificate-pack`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/zones/${t.zone_id}/custom_hostnames`,body:`json`};function C(e){return e.usage(`$0 custom-hostnames create
8
+
9
+ Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA.`).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`hostname`,{type:`string`,description:`The custom hostname that will point to your hostname via CNAME.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create Custom Hostname`,builder:C,handler:async e=>o({command:`custom-hostnames create`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=await t(e),p=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=p,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(S,{body:t,zone_id:p}));r(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await f(`hostname`,`The custom hostname that will point to your hostname via CNAME.`));let m=u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]),h=await a(`Creating`,async()=>o.send(S,{body:m,zone_id:p}));r(h,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`};function E(e){return e.usage(`$0 custom-hostnames delete <custom-hostname-id>
10
+
11
+ Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,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 <custom-hostname-id>`,describe:`Delete Custom Hostname (and any issued SSL certificates)`,builder:E,handler:async e=>o({command:`custom-hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force})){process.stderr.write(`Aborted.
12
+ `);return}let c=await a(`Deleting`,async()=>o.send(T,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`]}));r(c,{successLabel:`Deleted`})})};var O={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`,body:`json`};function k(e){return e.usage(`$0 custom-hostnames edit <custom-hostname-id>
13
+
14
+ Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).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 A={command:`edit <custom-hostname-id>`,describe:`Edit Custom Hostname`,builder:k,handler:async e=>o({command:`custom-hostnames edit`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(O,{body:t,zone_id:f,custom_hostname_id:e[`custom-hostname-id`]}));r(n,{successLabel:`Updated`});return}let p=u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]),m=await a(`Updating`,async()=>o.send(O,{body:p,zone_id:f,custom_hostname_id:e[`custom-hostname-id`]}));r(m,{successLabel:`Updated`})})};var j={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`};function M(e){return e.usage(`$0 custom-hostnames fallback-origin delete
15
+
16
+ Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback.`).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 N={command:`delete`,describe:`Delete Fallback Origin for Custom Hostnames`,builder:M,handler:async e=>o({command:`custom-hostnames fallback-origin delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force})){process.stderr.write(`Aborted.
17
+ `);return}let c=await a(`Deleting`,async()=>o.send(j,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`};function F(e){return e.usage(`$0 custom-hostnames fallback-origin get
18
+
19
+ Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Get Fallback Origin for Custom Hostnames`,builder:F,handler:async e=>o({command:`custom-hostnames fallback-origin get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(P,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`,body:`json`};function R(e){return e.usage(`$0 custom-hostnames fallback-origin update
20
+
21
+ Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`).option(`origin`,{type:`string`,description:`Your origin hostname that requests to your custom hostnames will be sent to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update`,describe:`Update Fallback Origin for Custom Hostnames`,builder:R,handler:async e=>o({command:`custom-hostnames fallback-origin update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({origin:d(e.origin,`origin`,`text`)}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(L,{body:t,zone_id:s}));r(n,{successLabel:`Updated`});return}e.origin===void 0&&(e.origin=await f(`origin`,`Your origin hostname that requests to your custom hostnames will be sent to.`));let l=u({origin:d(e.origin,`origin`,`text`)}),p=await a(`Updating`,async()=>o.send(L,{body:l,zone_id:s}));r(p,{successLabel:`Updated`})})},B={command:`fallback-origin`,describe:`Operations for fallback-origin`,builder:e=>e.command(N).command(I).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`};function H(e){return e.usage(`$0 custom-hostnames get <custom-hostname-id>
22
+
23
+ Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <custom-hostname-id>`,describe:`Custom Hostname Details`,builder:H,handler:async e=>o({command:`custom-hostnames get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(V,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`]}));r(c,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames`,query:[`hostname`,`hostname.exact`,`hostname.startsWith`,`hostname.contain`,`id`,`page`,`per_page`,`order`,`direction`,`ssl_status`,`hostname_status`,`certificate_authority`,`wildcard`,`custom_origin_server`,`ssl`]};function G(e){return e.usage(`$0 custom-hostnames list
24
+
25
+ List, search, sort, and filter all of your custom hostnames.`).option(`hostname`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-exact`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-starts-with`,{type:`string`,description:`Filters hostnames by a prefix match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.contain' parameters.`}).option(`hostname-contain`,{type:`string`,description:`Filters hostnames by a substring match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.startsWith' parameters.`}).option(`id`,{type:`string`,description:`Hostname ID to match against. This ID was generated and returned during the initial custom_hostname creation. This parameter cannot be used with the 'hostname', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of hostnames per page.`}).option(`order`,{type:`string`,description:`Field to order hostnames by.`,choices:[`ssl`,`ssl_status`]}).option(`direction`,{type:`string`,description:`Direction to order hostnames.`,choices:[`asc`,`desc`]}).option(`ssl-status`,{type:`string`,description:`Filter by SSL certificate status.`,choices:[`initializing`,`pending_validation`,`deleted`,`pending_issuance`,`pending_deployment`,`pending_deletion`,`pending_expiration`,`expired`,`active`,`initializing_timed_out`,`validation_timed_out`,`issuance_timed_out`,`deployment_timed_out`,`deletion_timed_out`,`pending_cleanup`,`staging_deployment`,`staging_active`,`deactivating`,`inactive`,`backup_issued`,`holding_deployment`]}).option(`hostname-status`,{type:`string`,description:`Filter by the hostname's activation status.`,choices:[`active`,`pending`,`active_redeploying`,`moved`,`pending_deletion`,`deleted`,`pending_blocked`,`pending_migration`,`pending_provisioned`,`test_pending`,`test_active`,`test_active_apex`,`test_blocked`,`test_failed`,`provisioned`,`blocked`]}).option(`certificate-authority`,{type:`string`,description:`Filter by the certificate authority that issued the SSL certificate.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`wildcard`,{type:`boolean`,description:`Filter by whether the custom hostname is a wildcard hostname.`}).option(`custom-origin-server`,{type:`string`,description:`Filter by custom origin server name.`}).option(`ssl`,{type:`string`,description:`Whether to filter hostnames based on if they have SSL enabled.`,choices:[`0`,`1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List Custom Hostnames`,builder:G,handler:async e=>o({command:`custom-hostnames list`,classification:{safeFlags:[`order`,`direction`,`ssl-status`,`hostname-status`,`certificate-authority`,`wildcard`,`ssl`,`dry-run`]}},e,async()=>{let o={hostname:e.hostname,"hostname.exact":e[`hostname-exact`],"hostname.startsWith":e[`hostname-starts-with`],"hostname.contain":e[`hostname-contain`],id:e.id,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,ssl_status:e[`ssl-status`],hostname_status:e[`hostname-status`],certificate_authority:e[`certificate-authority`],wildcard:e.wildcard,custom_origin_server:e[`custom-origin-server`],ssl:e.ssl};if(e.dryRun){i({command:`cf custom-hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(W,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var q={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/quota`};function J(e){return e.usage(`$0 custom-hostnames quota get
26
+
27
+ Returns custom hostname quota usage for a zone. The allocated quota is a soft limit; creating custom hostnames after usage exceeds this limit can still succeed until the hard cap is reached. Use the exceeded and hard_cap fields to track when usage is above the soft limit and when new custom hostname creation will be rejected.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get`,describe:`Get Custom Hostname Quota`,builder:J,handler:async e=>o({command:`custom-hostnames quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/quota`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(q,{zone_id:s}));r(c,{successLabel:`Loaded`})})},X={command:`quota`,describe:`Operations for quota`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Z={command:`custom-hostnames`,describe:`custom-hostnames`,builder:e=>e.command(w).command(D).command(A).command(U).command(K).command(x).command(B).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Z as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-MNz2D-PD.mjs";import{a as r,i,t as a}from"./context-q-6bMSL-.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-DaQ4MzBI.mjs";import{t as l}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-KWYZvJWM.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`,body:`json`};function g(e){return e.usage(`$0 custom-nameservers create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`,body:`json`};function g(e){return e.usage(`$0 custom-nameservers create
3
3
 
4
4
  Adds a custom nameserver to the account or zone for use as a vanity nameserver on zones.`).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Add account or zone Custom Nameserver`,builder:g,handler:async e=>l({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await p(`ns-name`,`The FQDN of the name server.`));let _=d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),v=await c(`Creating`,async()=>l.send(h,{body:_,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/custom_ns/${t.custom_ns_id}`};function y(e){return e.usage(`$0 custom-nameservers delete <custom-ns-id>
5
5
 
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-1AC-qwxS.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets`,body:`json`};function _(e){return e.usage(`$0 custom-pages account-assets create
3
+
4
+ Creates a custom asset for an account or zone.`).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a custom asset`,builder:_,handler:async e=>l({command:`custom-pages account-assets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),name:f(e.name,`name`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(g,{body:t,account_or_zone:m,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await p(`description`,`A short description of the custom asset.`)),e.name===void 0&&(e.name=await p(`name`,`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`)),e.url===void 0&&(e.url=await p(`url`,`The URL where the asset content is fetched from.`));let _=d({description:f(e.description,`description`,`text`),name:f(e.name,`name`,`text`),url:f(e.url,`url`,`text`)}),v=await c(`Creating`,async()=>l.send(g,{body:_,account_or_zone:m,account_or_zone_id:h}));o(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`,response:!1};function b(e){return e.usage(`$0 custom-pages account-assets delete <asset-name>
5
+
6
+ Deletes a custom asset from an account or zone.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,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 <asset-name>`,describe:`Delete a custom asset`,builder:b,handler:async e=>l({command:`custom-pages account-assets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await h({force:!!e.force})){process.stderr.write(`Aborted.
7
+ `);return}let f=await c(`Deleting`,async()=>l.send(y,{account_or_zone:u,account_or_zone_id:d,asset_name:e[`asset-name`]}));o(f,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`};function C(e){return e.usage(`$0 custom-pages account-assets get <asset-name>
8
+
9
+ Returns a custom asset for an account or zone.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <asset-name>`,describe:`Get a custom asset`,builder:C,handler:async e=>l({command:`custom-pages account-assets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(S,{account_or_zone:u,account_or_zone_id:d,asset_name:e[`asset-name`]}));o(f,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 custom-pages account-assets list
10
+
11
+ Lists custom assets for an account or zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom assets per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List custom assets`,builder:E,handler:async e=>l({command:`custom-pages account-assets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var O={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`,body:`json`};function k(e){return e.usage(`$0 custom-pages account-assets update <asset-name>
12
+
13
+ Updates a custom asset for an account or zone.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).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 A={command:`update <asset-name>`,describe:`Update a custom asset`,builder:k,handler:async e=>l({command:`custom-pages account-assets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(O,{body:t,account_or_zone:m,account_or_zone_id:h,asset_name:e[`asset-name`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await p(`description`,`A short description of the custom asset.`)),e.url===void 0&&(e.url=await p(`url`,`The URL where the asset content is fetched from.`));let g=d({description:f(e.description,`description`,`text`),url:f(e.url,`url`,`text`)}),_=await c(`Updating`,async()=>l.send(O,{body:g,account_or_zone:m,account_or_zone_id:h,asset_name:e[`asset-name`]}));o(_,{successLabel:`Updated`})})},j={command:`account-assets`,describe:`Manage account-level custom assets`,builder:e=>e.command(v).command(x).command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/${t.identifier}`};function N(e){return e.usage(`$0 custom-pages account-custom-pages get <identifier>
14
+
15
+ Returns the configuration for a custom page type.`).positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <identifier>`,describe:`Get a custom page`,builder:N,handler:async e=>l({command:`custom-pages account-custom-pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),identifier:String(e.identifier??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(M,{account_or_zone:u,account_or_zone_id:d,identifier:e.identifier}));o(f,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages`};function I(e){return e.usage(`$0 custom-pages account-custom-pages list
16
+
17
+ Lists all custom page configurations for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List custom pages`,builder:I,handler:async e=>l({command:`custom-pages account-custom-pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(F,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};var R={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/preview_tokens`,body:`json`};function z(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
18
+
19
+ Creates a signed JWT for previewing an account or zone-level custom page before it is published.`).option(`act`,{type:`string`,description:`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`}).option(`target`,{type:`string`,description:`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`}).option(`url`,{type:`string`,description:`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`}).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 B={command:`create`,describe:`Create a preview token`,builder:z,handler:async e=>l({command:`custom-pages account-custom-pages preview-tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages preview-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({act:f(e.act,`act`,`text`),target:f(e.target,`target`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(R,{body:t,account_or_zone:m,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e.act===void 0&&(e.act=await p(`act`,`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`)),e.target===void 0&&(e.target=await p(`target`,`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`)),e.url===void 0&&(e.url=await p(`url`,`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`));let g=d({act:f(e.act,`act`,`text`),target:f(e.target,`target`,`text`),url:f(e.url,`url`,`text`)}),_=await c(`Creating`,async()=>l.send(R,{body:g,account_or_zone:m,account_or_zone_id:h}));o(_,{successLabel:`Created`})})},V={command:`preview-tokens`,describe:`Preview tokens for account-level custom pages`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/${t.identifier}`,body:`json`};function U(e){return e.usage(`$0 custom-pages account-custom-pages update <identifier>
20
+
21
+ Updates the configuration for a custom page type.`).positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`state`,{type:`string`,description:`The custom page state.`,choices:[`default`,`customized`]}).coerce(`state`,e=>f(e,`state`,`text`)).option(`url`,{type:`string`,description:`The URL associated with the custom page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const W={command:`update <identifier>`,describe:`Update a custom page`,builder:U,handler:async e=>l({command:`custom-pages account-custom-pages update`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?d({state:e.state,url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(H,{body:t,account_or_zone:h,account_or_zone_id:g,identifier:e.identifier}));o(n,{successLabel:`Updated`});return}e.state===void 0&&(e.state=await m(`state`,`The custom page state.`,[`default`,`customized`])),e.url===void 0&&(e.url=await p(`url`,`The URL associated with the custom page.`));let _=d({state:e.state,url:f(e.url,`url`,`text`)}),v=await c(`Updating`,async()=>l.send(H,{body:_,account_or_zone:h,account_or_zone_id:g,identifier:e.identifier}));o(v,{successLabel:`Updated`})})},G={command:`account-custom-pages`,describe:`Manage account-level custom pages`,builder:e=>e.command(P).command(L).command(W).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`custom-pages`,describe:`Manage custom error and challenge pages and their assets for accounts and zones`,builder:e=>e.command(j).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
@@ -1,29 +1,29 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as n}from"./local-Dil4fTWX.mjs";import{n as r}from"./auth-MNz2D-PD.mjs";import{n as i}from"./resolve-C3FmNlSO.mjs";import{a,t as o}from"./context-q-6bMSL-.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-DaQ4MzBI.mjs";import{n as u,t as d}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as f,r as p,t as m}from"./body-parser-DkHKPkJ7.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v,t as y}from"./prompt-KWYZvJWM.mjs";import b from"node:fs";import x from"node:path";var ee={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database`,body:`json`};function te(e){return e.usage(`$0 d1 create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as n}from"./local-B4sZZTRA.mjs";import{n as r}from"./auth-BaUNb1Ed.mjs";import{n as i}from"./resolve-C3FmNlSO.mjs";import{a,t as o}from"./context-BQ6KeMgq.mjs";import{t as s}from"./output-O6b9MR9R.mjs";import{t as c}from"./dry-run-DQmFkNK_.mjs";import{t as l}from"./progress-CdlDthXA.mjs";import{n as u,t as d}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as f,n as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v,t as y}from"./prompt-1AC-qwxS.mjs";import b from"node:fs";import x from"node:path";var ee={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database`,body:`json`};function te(e){return e.usage(`$0 d1 create
3
3
 
4
- Create a new D1 database in your account.`).option(`jurisdiction`,{type:`string`,description:`Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>h(e,`jurisdiction`,`text`)).option(`name`,{type:`string`,description:`D1 database name.`}).option(`primary-location-hint`,{type:`string`,description:`Specify the region to create the D1 primary, if available. If this option is omitted, the D1 will be created as close as possible to the current user.`,choices:[`wnam`,`enam`,`weur`,`eeur`,`apac`,`oc`]}).coerce(`primary-location-hint`,e=>h(e,`primary-location-hint`,`text`)).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`read-replication-mode`].some(t=>e[t]!==void 0)){let t=[`read-replication-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --read_replication-* flag is set`)}return!0})}const ne={command:`create`,describe:`Create D1 Database`,builder:te,handler:async e=>d({command:`d1 create`,classification:{safeFlags:[`jurisdiction`,`primary-location-hint`,`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({jurisdiction:e.jurisdiction,name:h(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}):f(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=f(e.body),r=await l(`Creating`,async()=>t.send(ee,{body:n,account_id:i}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`D1 database name.`));let u=m({jurisdiction:e.jurisdiction,name:h(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Creating`,async()=>t.send(ee,{body:u,account_id:i}));s(d,{successLabel:`Created`})})};var re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`};function ie(e){return e.usage(`$0 d1 delete <database-id>
4
+ Create a new D1 database in your account.`).option(`jurisdiction`,{type:`string`,description:`Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>h(e,`jurisdiction`,`text`)).option(`name`,{type:`string`,description:`D1 database name.`}).option(`primary-location-hint`,{type:`string`,description:`Specify the region to create the D1 primary, if available. If this option is omitted, the D1 will be created as close as possible to the current user.`,choices:[`wnam`,`enam`,`weur`,`eeur`,`apac`,`oc`]}).coerce(`primary-location-hint`,e=>h(e,`primary-location-hint`,`text`)).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`read-replication-mode`].some(t=>e[t]!==void 0)){let t=[`read-replication-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --read_replication-* flag is set`)}return!0})}const ne={command:`create`,describe:`Create D1 Database`,builder:te,handler:async e=>d({command:`d1 create`,classification:{safeFlags:[`jurisdiction`,`primary-location-hint`,`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({jurisdiction:e.jurisdiction,name:h(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Creating`,async()=>t.send(ee,{body:n,account_id:i}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`D1 database name.`));let u=m({jurisdiction:e.jurisdiction,name:h(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Creating`,async()=>t.send(ee,{body:u,account_id:i}));s(d,{successLabel:`Created`})})};var re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`};function ie(e){return e.usage(`$0 d1 delete <database-id>
5
5
 
6
6
  Delete a D1 database.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,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 ae={command:`delete <database-id>`,describe:`Delete D1 Database`,builder:ie,handler:async e=>d({command:`d1 delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,!await v({force:!!e.force,message:`This permanently deletes the D1 database and all of its data.`})){process.stderr.write(`Aborted.
7
7
  `);return}let u=await l(`Deleting`,async()=>t.send(re,{account_id:i,database_id:e[`database-id`]}));s(u,{successLabel:`Deleted`})})};var oe={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,body:`json`};function se(e){return e.usage(`$0 d1 edit <database-id>
8
8
 
9
- Partially update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`read-replication-mode`].some(t=>e[t]!==void 0)){let t=[`read-replication-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --read_replication-* flag is set`)}return!0})}const ce={command:`edit <database-id>`,describe:`Update D1 Database partially`,builder:se,handler:async e=>d({command:`d1 edit`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read_replication:{mode:e[`read-replication-mode`]}}):f(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=f(e.body),r=await l(`Updating`,async()=>t.send(oe,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Updated`});return}let u=m({read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Updating`,async()=>t.send(oe,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Updated`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,query:[`fields`],joined:[`fields`]};function ue(e){return e.usage(`$0 d1 get <database-id>
9
+ Partially update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`read-replication-mode`].some(t=>e[t]!==void 0)){let t=[`read-replication-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --read_replication-* flag is set`)}return!0})}const ce={command:`edit <database-id>`,describe:`Update D1 Database partially`,builder:se,handler:async e=>d({command:`d1 edit`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read_replication:{mode:e[`read-replication-mode`]}}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Updating`,async()=>t.send(oe,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Updated`});return}let u=m({read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Updating`,async()=>t.send(oe,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Updated`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,query:[`fields`],joined:[`fields`]};function ue(e){return e.usage(`$0 d1 get <database-id>
10
10
 
11
11
  Get details for a specific D1 database.`).positional(`database-id`,{type:`string`,description:`Database ID`,demandOption:!0}).option(`fields`,{type:`string`,description:`Comma-separated list of fields to include in the response. When omitted,
12
12
  all fields are returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <database-id>`,describe:`Get D1 Database`,builder:ue,handler:async e=>d({command:`d1 get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={fields:e.fields};if(e.dryRun){let n=await a();c({command:`cf d1 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>i.send(le,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database`,query:[`name`,`page`,`per_page`]};function pe(e){return e.usage(`$0 d1 list
13
13
 
14
14
  List D1 databases in your account.`).option(`name`,{type:`string`,description:`a database name to search for.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List D1 Databases`,builder:pe,handler:async e=>d({command:`d1 list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await a();c({command:`cf d1 list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database`,pathParams:{},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>i.send(fe,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/query`,body:`json`};function he(e){return e.usage(`$0 d1 query <database-id>
15
15
 
16
- Execute a SQL query against a D1 database and return results as objects.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. 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:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const ge={command:`query <database-id>`,describe:`Query D1 Database`,builder:he,handler:async e=>d({command:`d1 query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/query`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:p(e.batch,`batch`)}):f(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=f(e.body),r=await l(`Loading`,async()=>t.send(S,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Loaded`});return}let u=m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:p(e.batch,`batch`)}),d=await l(`Loading`,async()=>t.send(S,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Loaded`})})};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/raw`,body:`json`};function _e(e){return e.usage(`$0 d1 raw <database-id>
16
+ Execute a SQL query against a D1 database and return results as objects.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. 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:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const ge={command:`query <database-id>`,describe:`Query D1 Database`,builder:he,handler:async e=>d({command:`d1 query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/query`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Loading`,async()=>t.send(S,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Loaded`});return}let u=m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}),d=await l(`Loading`,async()=>t.send(S,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Loaded`})})};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/raw`,body:`json`};function _e(e){return e.usage(`$0 d1 raw <database-id>
17
17
 
18
- Execute a SQL query against a D1 database and return result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. 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:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const ve={command:`raw <database-id>`,describe:`Raw D1 Database query`,builder:_e,handler:async e=>d({command:`d1 raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/raw`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:p(e.batch,`batch`)}):f(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=f(e.body),r=await l(`Loading`,async()=>t.send(C,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Loaded`});return}let u=m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:p(e.batch,`batch`)}),d=await l(`Loading`,async()=>t.send(C,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Loaded`})})};var ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/bookmark`,query:[`timestamp`]};function be(e){return e.usage(`$0 d1 time-travel get-bookmark <database-id>
18
+ Execute a SQL query against a D1 database and return result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. 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:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const ve={command:`raw <database-id>`,describe:`Raw D1 Database query`,builder:_e,handler:async e=>d({command:`d1 raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/raw`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Loading`,async()=>t.send(C,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Loaded`});return}let u=m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}),d=await l(`Loading`,async()=>t.send(C,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Loaded`})})};var ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/bookmark`,query:[`timestamp`]};function be(e){return e.usage(`$0 d1 time-travel get-bookmark <database-id>
19
19
 
20
20
  Retrieve the current bookmark, or the nearest bookmark at or before a provided timestamp. Bookmarks can be used with the restore endpoint to revert the database to a previous point in time.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`timestamp`,{type:`string`,description:`An optional ISO 8601 timestamp. If provided, returns the nearest available bookmark at or before this timestamp. If omitted, returns the current bookmark.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`get-bookmark <database-id>`,describe:`Get D1 database bookmark`,builder:be,handler:async e=>d({command:`d1 time-travel get-bookmark`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={timestamp:e.timestamp};if(e.dryRun){let n=await a();c({command:`cf d1 time-travel get-bookmark`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/time_travel/bookmark`,pathParams:{"database-id":String(e[`database-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>i.send(ye,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Loaded`})})};var Se={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/restore`,query:[`bookmark`,`timestamp`]};function Ce(e){return e.usage(`$0 d1 time-travel restore <database-id>
21
21
 
22
22
  Restore a D1 database to a previous point in time either via a bookmark or a timestamp.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`bookmark`,{type:`string`,description:"A bookmark to restore the database to. Required if `timestamp` is not provided."}).option(`timestamp`,{type:`string`,description:"An ISO 8601 timestamp to restore the database to. Required if `bookmark` is not provided."}).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 we={command:`restore <database-id>`,describe:`Restore D1 Database to a bookmark or point in time`,builder:Ce,handler:async e=>d({command:`d1 time-travel restore`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={bookmark:e.bookmark,timestamp:e.timestamp};if(e.dryRun){let n=await a();c({command:`cf d1 time-travel restore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/time_travel/restore`,pathParams:{"database-id":String(e[`database-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();if(e.accountId=u,!await v({force:!!e.force,message:`This reverts the D1 database to a previous point in time. Data written after the bookmark will be lost.`})){process.stderr.write(`Aborted.
23
- `);return}let d=await l(`Deleting`,async()=>i.send(Se,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Deleted`})})},Te={command:`time-travel`,describe:`use specific point-in-time backups of your D1 database`,builder:e=>e.command(xe).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ee={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/undelete`,body:`json`};function De(e){return e.usage("$0 d1 undelete <database-id>\n\nRestore a deleted D1 database. The database is restored with the name it had when it was deleted, unless `new_name` is provided. The restored database counts against the account's limits. Undeleting a database that is not deleted succeeds without changes, unless `new_name` differs from its current name which errors. Once a database is undeleted, Time Travel (point-in-time recovery) cannot restore it to a bookmark or timestamp at or before the undeletion. Only states after the undeletion can be restored.").positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`new-name`,{type:`string`,description:`Restore the database with this name instead of the name it had when it was deleted. Required if another database in the account already uses that name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oe={command:`undelete <database-id>`,describe:`Undelete D1 Database`,builder:De,handler:async e=>d({command:`d1 undelete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 undelete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/undelete`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({new_name:h(e[`new-name`],`new-name`,`text`)}):f(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,!await v({force:!!e.force,message:`After undeleting, Time Travel cannot restore the D1 database to a point in time at or before the undeletion.`})){process.stderr.write(`Aborted.
24
- `);return}if(e.body){let n=f(e.body),r=await l(`Deleting`,async()=>t.send(Ee,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Deleted`});return}let u=m({new_name:h(e[`new-name`],`new-name`,`text`)}),d=await l(`Deleting`,async()=>t.send(Ee,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Deleted`})})};var ke={method:`PUT`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,body:`json`};function Ae(e){return e.usage(`$0 d1 update <database-id>
23
+ `);return}let d=await l(`Deleting`,async()=>i.send(Se,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Deleted`})})},Te={command:`time-travel`,describe:`use specific point-in-time backups of your D1 database`,builder:e=>e.command(xe).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ee={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/undelete`,body:`json`};function De(e){return e.usage("$0 d1 undelete <database-id>\n\nRestore a deleted D1 database. The database is restored with the name it had when it was deleted, unless `new_name` is provided. The restored database counts against the account's limits. Undeleting a database that is not deleted succeeds without changes, unless `new_name` differs from its current name which errors. Once a database is undeleted, Time Travel (point-in-time recovery) cannot restore it to a bookmark or timestamp at or before the undeletion. Only states after the undeletion can be restored.").positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`new-name`,{type:`string`,description:`Restore the database with this name instead of the name it had when it was deleted. Required if another database in the account already uses that name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oe={command:`undelete <database-id>`,describe:`Undelete D1 Database`,builder:De,handler:async e=>d({command:`d1 undelete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 undelete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/undelete`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({new_name:h(e[`new-name`],`new-name`,`text`)}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,!await v({force:!!e.force,message:`After undeleting, Time Travel cannot restore the D1 database to a point in time at or before the undeletion.`})){process.stderr.write(`Aborted.
24
+ `);return}if(e.body){let n=p(e.body),r=await l(`Deleting`,async()=>t.send(Ee,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Deleted`});return}let u=m({new_name:h(e[`new-name`],`new-name`,`text`)}),d=await l(`Deleting`,async()=>t.send(Ee,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Deleted`})})};var ke={method:`PUT`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,body:`json`};function Ae(e){return e.usage(`$0 d1 update <database-id>
25
25
 
26
- Update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`update <database-id>`,describe:`Update D1 Database`,builder:Ae,handler:async e=>d({command:`d1 update`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read_replication:{mode:e[`read-replication-mode`]}}):f(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=f(e.body),r=await l(`Updating`,async()=>t.send(ke,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Updated`});return}e[`read-replication-mode`]===void 0&&(e[`read-replication-mode`]=await _(`read-replication-mode`,`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,[`auto`,`disabled`]));let u=m({read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Updating`,async()=>t.send(ke,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Updated`})})},Me=(e,t,n)=>{let r=e instanceof RegExp?Ne(e,n):e,i=t instanceof RegExp?Ne(t,n):t,a=r!==null&&i!=null&&Pe(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},Ne=(e,t)=>{let n=t.match(e);return n?n[0]:null},Pe=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},Fe=`\0SLASH`+Math.random()+`\0`,w=`\0OPEN`+Math.random()+`\0`,T=`\0CLOSE`+Math.random()+`\0`,Ie=`\0COMMA`+Math.random()+`\0`,E=`\0PERIOD`+Math.random()+`\0`,Le=new RegExp(Fe,`g`),Re=new RegExp(w,`g`),ze=new RegExp(T,`g`),Be=new RegExp(Ie,`g`),Ve=new RegExp(E,`g`),He=/\\\\/g,Ue=/\\{/g,We=/\\}/g,Ge=/\\,/g,Ke=/\\\./g;function D(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function qe(e){return e.replace(He,Fe).replace(Ue,w).replace(We,T).replace(Ge,Ie).replace(Ke,E)}function Je(e){return e.replace(Le,`\\`).replace(Re,`{`).replace(ze,`}`).replace(Be,`,`).replace(Ve,`.`)}function O(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function Ye(e){let t=[],n=``;for(;;){let r=Me(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],O(t,r),t}let{pre:i,body:a,post:o}=r,s=i.split(`,`);if(s[0]=n+s[0],s[s.length-1]+=`{`+a+`}`,!o.length)return O(t,s),t;n=s.pop(),O(t,s),e=o}}function Xe(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),A(qe(e),n,r,i,0,a,!0).map(Je)}function Ze(e){return`{`+e+`}`}function Qe(e){return/^-?0\d/.test(e)}function $e(e,t){return e<=t}function et(e,t){return e>=t}function k(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!a||u){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function tt(e,t,n,r){let i=e.split(/\.\./),a=[];
26
+ Update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`update <database-id>`,describe:`Update D1 Database`,builder:Ae,handler:async e=>d({command:`d1 update`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read_replication:{mode:e[`read-replication-mode`]}}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Updating`,async()=>t.send(ke,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Updated`});return}e[`read-replication-mode`]===void 0&&(e[`read-replication-mode`]=await _(`read-replication-mode`,`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,[`auto`,`disabled`]));let u=m({read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Updating`,async()=>t.send(ke,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Updated`})})},Me=(e,t,n)=>{let r=e instanceof RegExp?Ne(e,n):e,i=t instanceof RegExp?Ne(t,n):t,a=r!==null&&i!=null&&Pe(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},Ne=(e,t)=>{let n=t.match(e);return n?n[0]:null},Pe=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},Fe=`\0SLASH`+Math.random()+`\0`,w=`\0OPEN`+Math.random()+`\0`,T=`\0CLOSE`+Math.random()+`\0`,Ie=`\0COMMA`+Math.random()+`\0`,E=`\0PERIOD`+Math.random()+`\0`,Le=new RegExp(Fe,`g`),Re=new RegExp(w,`g`),ze=new RegExp(T,`g`),Be=new RegExp(Ie,`g`),Ve=new RegExp(E,`g`),He=/\\\\/g,Ue=/\\{/g,We=/\\}/g,Ge=/\\,/g,Ke=/\\\./g;function D(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function qe(e){return e.replace(He,Fe).replace(Ue,w).replace(We,T).replace(Ge,Ie).replace(Ke,E)}function Je(e){return e.replace(Le,`\\`).replace(Re,`{`).replace(ze,`}`).replace(Be,`,`).replace(Ve,`.`)}function O(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function Ye(e){let t=[],n=``;for(;;){let r=Me(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],O(t,r),t}let{pre:i,body:a,post:o}=r,s=i.split(`,`);if(s[0]=n+s[0],s[s.length-1]+=`{`+a+`}`,!o.length)return O(t,s),t;n=s.pop(),O(t,s),e=o}}function Xe(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),A(qe(e),n,r,i,0,a,!0).map(Je)}function Ze(e){return`{`+e+`}`}function Qe(e){return/^-?0\d/.test(e)}function $e(e,t){return e<=t}function et(e,t){return e>=t}function k(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!a||u){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function tt(e,t,n,r){let i=e.split(/\.\./),a=[];
27
27
  /* c8 ignore start */
28
28
  if(i[0]===void 0||i[1]===void 0)return a;
29
29
  /* c8 ignore stop */
@@ -31,7 +31,7 @@ let o=D(i[0]),s=D(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]
31
31
  /* c8 ignore start */
32
32
  if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);
33
33
  /* c8 ignore stop */
34
- let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(nt))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(M(d)+`-`+M(t)):t===d&&r.push(M(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(M(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(M(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let e=r[0].length===2?r[0].slice(-1):r[0];return[rt(e),!1,u-n,!1]}let f=`[`+(l?`^`:``)+N(r)+`]`,p=`[`+(l?``:`^`)+N(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},P=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var F;const at=/* @__PURE__ */ new Set([`!`,`?`,`+`,`*`,`@`]),I=e=>at.has(e),L=e=>I(e.type),ot=/* @__PURE__ */ new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),st=/* @__PURE__ */ new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),ct=/* @__PURE__ */ new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),R=/* @__PURE__ */ new Map([[`!`,/* @__PURE__ */ new Map([[`!`,`@`]])],[`?`,/* @__PURE__ */ new Map([[`*`,`*`],[`+`,`*`]])],[`@`,/* @__PURE__ */ new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,/* @__PURE__ */ new Map([[`?`,`*`],[`*`,`*`]])]]),z=`(?!\\.)`,lt=/* @__PURE__ */ new Set([`[`,`.`]),ut=/* @__PURE__ */ new Set([`..`,`.`]),dt=/* @__PURE__ */ new Set(`().*{}+?[]^$\\!`),ft=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),B=`[^/]+?`;let pt=0;var V=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++pt;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){
34
+ let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1)l=!0,a++;else{if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c)c=!0,a++;else{if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(nt))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}c=!1,d?(t>d?r.push(M(d)+`-`+M(t)):t===d&&r.push(M(t)),d=``,a++):e.startsWith(`-]`,a+1)?(r.push(M(t+`-`)),a+=2):e.startsWith(`-`,a+1)?(d=t,a+=2):(r.push(M(t)),a++)}}}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let e=r[0].length===2?r[0].slice(-1):r[0];return[rt(e),!1,u-n,!1]}let f=`[`+(l?`^`:``)+N(r)+`]`,p=`[`+(l?``:`^`)+N(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},P=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var F;const at=/* @__PURE__ */ new Set([`!`,`?`,`+`,`*`,`@`]),I=e=>at.has(e),L=e=>I(e.type),ot=/* @__PURE__ */ new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),st=/* @__PURE__ */ new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),ct=/* @__PURE__ */ new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),R=/* @__PURE__ */ new Map([[`!`,/* @__PURE__ */ new Map([[`!`,`@`]])],[`?`,/* @__PURE__ */ new Map([[`*`,`*`],[`+`,`*`]])],[`@`,/* @__PURE__ */ new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,/* @__PURE__ */ new Map([[`?`,`*`],[`*`,`*`]])]]),z=`(?!\\.)`,lt=/* @__PURE__ */ new Set([`[`,`.`]),ut=/* @__PURE__ */ new Set([`..`,`.`]),dt=/* @__PURE__ */ new Set(`().*{}+?[]^$\\!`),ft=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),B=`[^/]+?`;let pt=0;var V=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++pt;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){
35
35
  /* c8 ignore start */
36
36
  if(this.#t!==void 0)return this.#t;
37
37
  /* c8 ignore stop */
@@ -49,9 +49,7 @@ this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e
49
49
  /* c8 ignore start */
50
50
  let e=this.#i?this.#i.#r.length:0;
51
51
  /* c8 ignore stop */
52
- return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new F(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&I(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new F(n,t);u=F.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new F(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}
53
- /* c8 ignore stop */
54
- if(!r.noext&&I(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new F(n,d);d.push(o),u=F.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new F(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,st)}#m(e,t=ot){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=ct){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new F(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!R.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=R.get(this.type),n=e.#r[0],r=t?.get(n.type);
52
+ return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new F(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`)o=!o,d+=n;else if(s)u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;else if(n===`[`)s=!0,c=u,l=!1,d+=n;else if(!r.noext&&I(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new F(n,t);u=F.#f(e,a,u,r,i+1),t.push(a)}else d+=n}return t.push(d),u}let u=n+1,d=new F(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`)o=!o,p+=n;else if(s)u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;else if(n===`[`)s=!0,c=u,l=!1,p+=n;else if(!r.noext&&I(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new F(n,d);d.push(o),u=F.#f(e,o,u,r,i+a)}else if(n===`|`)d.push(p),p=``,f.push(d),d=new F(null,t);else{if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,st)}#m(e,t=ot){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=ct){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new F(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!R.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=R.get(this.type),n=e.#r[0],r=t?.get(n.type);
55
53
  /* c8 ignore start - impossible */
56
54
  if(!r)return!1;
57
55
  /* c8 ignore stop */
@@ -63,7 +61,7 @@ let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.n
63
61
  /* c8 ignore start */
64
62
  if(typeof t==`string`)throw Error(`string type in extglob ast??`);
65
63
  /* c8 ignore stop */
66
- let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(dt.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?B:`[^/]*?`,t=!0;continue}if(o=!1,c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=it(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=`[^/]`,t=!0;continue}i+=ft(c)}return[i,P(e),!!t,a]}};F=V;const mt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),H=(e,t,n={})=>(j(t),!n.nocomment&&t.charAt(0)===`#`?!1:new Y(t,n).match(e)),ht=/^\*+([^+@!?*[(]*)$/,gt=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),_t=e=>t=>t.endsWith(e),vt=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),yt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),bt=/^\*+\.\*+$/,xt=e=>!e.startsWith(`.`)&&e.includes(`.`),St=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ct=/^\.\*+$/,wt=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),Tt=/^\*+$/,Et=e=>e.length!==0&&!e.startsWith(`.`),Dt=e=>e.length!==0&&e!==`.`&&e!==`..`,Ot=/^\?+([^+@!?*[(]*)?$/,kt=([e,t=``])=>{let n=U([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},At=([e,t=``])=>{let n=W([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},jt=([e,t=``])=>{let n=W([e]);return t?e=>n(e)&&e.endsWith(t):n},Mt=([e,t=``])=>{let n=U([e]);return t?e=>n(e)&&e.endsWith(t):n},U=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},W=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},G=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,K={win32:{sep:`\\`},posix:{sep:`/`}};H.sep=G===`win32`?K.win32.sep:K.posix.sep;const q=Symbol(`globstar **`);H.GLOBSTAR=q,H.filter=(e,t={})=>n=>H(n,e,t);const J=(e,t={})=>Object.assign({},e,t);H.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return H;let t=H;return Object.assign((n,r,i={})=>t(n,r,J(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,J(e,n))}static defaults(n){return t.defaults(J(e,n)).Minimatch}},AST:class extends t.AST{
64
+ let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r)r=!1,i+=(dt.has(c)?`\\`:``)+c;else if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?B:`[^/]*?`,t=!0}else if(o=!1,c===`\\`)s===e.length-1?i+=`\\\\`:r=!0;else{if(c===`[`){let[n,r,o,c]=it(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}c===`?`?(i+=`[^/]`,t=!0):i+=ft(c)}}return[i,P(e),!!t,a]}};F=V;const mt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),H=(e,t,n={})=>(j(t),!n.nocomment&&t.charAt(0)===`#`?!1:new Y(t,n).match(e)),ht=/^\*+([^+@!?*[(]*)$/,gt=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),_t=e=>t=>t.endsWith(e),vt=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),yt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),bt=/^\*+\.\*+$/,xt=e=>!e.startsWith(`.`)&&e.includes(`.`),St=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ct=/^\.\*+$/,wt=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),Tt=/^\*+$/,Et=e=>e.length!==0&&!e.startsWith(`.`),Dt=e=>e.length!==0&&e!==`.`&&e!==`..`,Ot=/^\?+([^+@!?*[(]*)?$/,kt=([e,t=``])=>{let n=U([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},At=([e,t=``])=>{let n=W([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},jt=([e,t=``])=>{let n=W([e]);return t?e=>n(e)&&e.endsWith(t):n},Mt=([e,t=``])=>{let n=U([e]);return t?e=>n(e)&&e.endsWith(t):n},U=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},W=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},G=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,K={win32:{sep:`\\`},posix:{sep:`/`}};H.sep=G===`win32`?K.win32.sep:K.posix.sep;const q=Symbol(`globstar **`);H.GLOBSTAR=q,H.filter=(e,t={})=>n=>H(n,e,t);const J=(e,t={})=>Object.assign({},e,t);H.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return H;let t=H;return Object.assign((n,r,i={})=>t(n,r,J(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,J(e,n))}static defaults(n){return t.defaults(J(e,n)).Minimatch}},AST:class extends t.AST{
67
65
  /* c8 ignore start */
68
66
  constructor(t,n,r={}){super(t,n,J(e,r))}
69
67
  /* c8 ignore stop */
@@ -81,14 +79,14 @@ return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`
81
79
  applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
82
80
  );`}function Rt(e){return`SELECT *
83
81
  FROM ${Z(e)}
84
- ORDER BY id`}function zt(e){if(e.pattern!==void 0&&e.dir===void 0)throw Error(`You have set --pattern "${e.pattern}" but have not set --dir.\n\nWhen --pattern is set, --dir must also be set, and --pattern must start with "<dir>/".`);let t=X(e.dir??`./migrations`),n=X(`${t}/*.sql`),r;if(e.pattern===void 0)r=n;else{r=X(e.pattern);try{It(r,t)}catch{throw Error(`--pattern "${e.pattern}" must start with "${t}/" to match --dir "${t}".\nEither change --pattern so it starts with "${t}/" (for example, "${n}"), or change --dir to match the start of your pattern.`)}}return{migrationsPath:x.resolve(e.cwd??process.cwd(),t),migrationsDir:t,migrationsPattern:r,migrationsTableName:e.table??`d1_migrations`}}function Bt(e,t){let n=[],r=[{abs:e,rel:``}];for(;r.length>0;){let{abs:e,rel:i}=r.pop(),a;try{a=b.readdirSync(e,{withFileTypes:!0})}catch{continue}for(let o of a){let a=i===``?o.name:`${i}/${o.name}`;o.isDirectory()?t.match(a,!0)&&r.push({abs:x.join(e,o.name),rel:a}):o.isFile()&&t.match(a)&&n.push(a)}}return n.sort(Ht)}function Q(e){let t=e.split(`/`)[0]??``;return parseInt(t.split(`_`)[0]??``,10)}function Vt(e,t){let n=Q(e),r=Q(t);if(n!==r){if(Number.isFinite(n)&&Number.isFinite(r))return n-r;if(Number.isFinite(n))return-1;if(Number.isFinite(r))return 1}return e<t?-1:+(e>t)}function Ht(e,t){let n=e.split(`/`),r=t.split(`/`),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=Vt(n[e]??``,r[e]??``);if(t!==0)return t}return n.length-r.length}function Ut(e){let t=It(e.migrationsPattern,e.migrationsDir);return Bt(e.migrationsPath,new Y(t,{dot:!1}))}function Wt(e,t){let n=[];for(let r of e)t.includes(r)||n.push(r);return n}function Gt(e){let t=Ut(e).map(e=>Q(e)).filter(e=>Number.isFinite(e));return Math.max(...t,0)+1}function Kt(e){if(Bt(e.migrationsPath,new Y(`*/migration.sql`,{dot:!1})).length!==0)return X(`${e.migrationsDir}/*/migration.sql`)}function qt(e){let t=``,n,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=e[a+1];if(n!==void 0){t+=o,o===n&&(s===n?(t+=s,a++):n=void 0);continue}if(r){o===`\r`&&s===`
82
+ ORDER BY id`}function zt(e){if(e.pattern!==void 0&&e.dir===void 0)throw Error(`You have set --pattern "${e.pattern}" but have not set --dir.\n\nWhen --pattern is set, --dir must also be set, and --pattern must start with "<dir>/".`);let t=X(e.dir??`./migrations`),n=X(`${t}/*.sql`),r;if(e.pattern===void 0)r=n;else{r=X(e.pattern);try{It(r,t)}catch{throw Error(`--pattern "${e.pattern}" must start with "${t}/" to match --dir "${t}".\nEither change --pattern so it starts with "${t}/" (for example, "${n}"), or change --dir to match the start of your pattern.`)}}return{migrationsPath:x.resolve(e.cwd??process.cwd(),t),migrationsDir:t,migrationsPattern:r,migrationsTableName:e.table??`d1_migrations`}}function Bt(e,t){let n=[],r=[{abs:e,rel:``}];for(;r.length>0;){let{abs:e,rel:i}=r.pop(),a;try{a=b.readdirSync(e,{withFileTypes:!0})}catch{continue}for(let o of a){let a=i===``?o.name:`${i}/${o.name}`;o.isDirectory()?t.match(a,!0)&&r.push({abs:x.join(e,o.name),rel:a}):o.isFile()&&t.match(a)&&n.push(a)}}return n.sort(Ht)}function Q(e){let t=e.split(`/`)[0]??``;return parseInt(t.split(`_`)[0]??``,10)}function Vt(e,t){let n=Q(e),r=Q(t);if(n!==r){if(Number.isFinite(n)&&Number.isFinite(r))return n-r;if(Number.isFinite(n))return-1;if(Number.isFinite(r))return 1}return e<t?-1:+(e>t)}function Ht(e,t){let n=e.split(`/`),r=t.split(`/`),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=Vt(n[e]??``,r[e]??``);if(t!==0)return t}return n.length-r.length}function Ut(e){let t=It(e.migrationsPattern,e.migrationsDir);return Bt(e.migrationsPath,new Y(t,{dot:!1}))}function Wt(e,t){let n=[];for(let r of e)t.includes(r)||n.push(r);return n}function Gt(e){let t=Ut(e).map(e=>Q(e)).filter(e=>Number.isFinite(e));return Math.max(...t,0)+1}function Kt(e){if(Bt(e.migrationsPath,new Y(`*/migration.sql`,{dot:!1})).length!==0)return X(`${e.migrationsDir}/*/migration.sql`)}function qt(e){let t=``,n,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=e[a+1];n===void 0?r?o===`\r`&&s===`
85
83
  `?(t+=`
86
84
  `,a++,r=!1):(t+=o,r=o!==`
87
- `);continue}if(i){o===`\r`&&s===`
85
+ `):i?o===`\r`&&s===`
86
+ `?(t+=`
87
+ `,a++):(t+=o,o===`*`&&s===`/`&&(t+=s,a++,i=!1)):o===`-`&&s===`-`?(t+=`--`,a++,r=!0):o===`/`&&s===`*`?(t+=`/*`,a++,i=!0):o===`'`||o===`"`||o==="`"?(t+=o,n=o):o===`[`?(t+=o,n=`]`):o===`\r`&&s===`
88
88
  `?(t+=`
89
- `,a++):(t+=o,o===`*`&&s===`/`&&(t+=s,a++,i=!1));continue}if(o===`-`&&s===`-`){t+=`--`,a++,r=!0;continue}if(o===`/`&&s===`*`){t+=`/*`,a++,i=!0;continue}if(o===`'`||o===`"`||o==="`"){t+=o,n=o;continue}if(o===`[`){t+=o,n=`]`;continue}if(o===`\r`&&s===`
90
- `){t+=`
91
- `,a++;continue}t+=o}return t}function Jt({migrationsPath:e,migrationName:t,migrationsTableName:n}){return`${b.readFileSync(x.join(e,t),`utf8`)}
89
+ `,a++):t+=o:(t+=o,o===n&&(s===n?(t+=s,a++):n=void 0))}return t}function Jt({migrationsPath:e,migrationName:t,migrationsTableName:n}){return`${b.readFileSync(x.join(e,t),`utf8`)}
92
90
  INSERT INTO ${Z(n)} (name)
93
- values ('${t.replace(/'/g,`''`)}');`}function Yt(e){return e.option(`dir`,{type:`string`,description:`Directory containing migration files (default: ./migrations)`}).option(`pattern`,{type:`string`,description:`Glob for discovering migration files under --dir. Defaults to "<dir>/*.sql"; Drizzle's nested layout uses "<dir>/*/migration.sql"`})}function Xt(e){return Yt(e).option(`table`,{type:`string`,description:`Table recording applied migrations`,default:`d1_migrations`})}async function $(e,t,n,r,i,a=!1){return l(i,async()=>{let i={account_id:t,database_id:n,body:{sql:qt(r)}};return a?((await e.send(C,i))?.result??[]).map(e=>{let t=e.results?.columns??[],n=e.results?.rows??[];return{...e,results:n.map(e=>Object.fromEntries(t.map((t,n)=>[t,e[n]])))}}):(await e.send(S,i))?.result??[]})}async function Zt(e){if(!i(e.database))throw Error(`Expected a D1 database ID, but received <database>=${JSON.stringify(e.database)}. Database names and binding names are not accepted.`);let t=zt({dir:e.dir,pattern:e.pattern,table:e.table});if(!b.existsSync(t.migrationsPath))throw Error(`No migrations directory at ${t.migrationsPath}.`+(e.dir===void 0?` Pass --dir to point at one.`:``));return{client:await r(e),accountId:e.local?n:await o(),databaseId:e.database,config:t,local:e.local===!0}}async function Qt(e){let{client:t,accountId:n,databaseId:r,config:i}=e;await $(t,n,r,Lt(i.migrationsTableName),`Preparing`,e.local);let a=(await $(t,n,r,Rt(i.migrationsTableName),`Loading`,e.local))[0].results.map(e=>e.name),o=Ut(i);if(o.length===0){let e=Kt(i);e!==void 0&&process.stderr.write(`No files matched --pattern "${i.migrationsPattern}", but "${e}" does match. If an ORM such as drizzle manages your migrations, pass --pattern "${e}".\n`)}return{applied:a,all:o,unapplied:Wt(o,a)}}function $t(e){return Xt(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const en={command:`apply <database>`,describe:`Apply any unapplied D1 migrations`,builder:$t,handler:async e=>{let t=await Zt(e),n=(await Qt(t)).unapplied.map(e=>({name:e,status:`🕒️`}));if(n.length===0){s([],{successLabel:`No migrations to apply`,quiet:e.quiet});return}if(await y(`About to apply ${n.length} migration(s)\nYour database may not be available to serve requests during the migration, continue?`)){for(let e of n){let n=Jt({migrationsPath:t.config.migrationsPath,migrationName:e.name,migrationsTableName:t.config.migrationsTableName}),r=!0,i=[];try{let i=await $(t.client,t.accountId,t.databaseId,n,`Applying ${e.name}`,t.local);for(let e of i)e.success||(r=!1)}catch(e){r=!1,i=[e instanceof Error?e.message:String(e)]}if(e.status=r?`✅`:`❌`,i.length>0)throw Error(i.join(`
91
+ values ('${t.replace(/'/g,`''`)}');`}function Yt(e){return e.option(`dir`,{type:`string`,description:`Directory containing migration files (default: ./migrations)`}).option(`pattern`,{type:`string`,description:`Glob for discovering migration files under --dir. Defaults to "<dir>/*.sql"; Drizzle's nested layout uses "<dir>/*/migration.sql"`})}function Xt(e){return Yt(e).option(`table`,{type:`string`,description:`Table recording applied migrations`,default:`d1_migrations`})}async function $(e,t,n,r,i,a=!1){return l(i,async()=>{let i={account_id:t,database_id:n,body:{sql:qt(r)}};return a?((await e.send(C,i))?.result??[]).map(e=>{let t=e.results?.columns??[],n=e.results?.rows??[];return{...e,results:n.map(e=>Object.fromEntries(t.map((t,n)=>[t,e[n]])))}}):(await e.send(S,i))?.result??[]})}async function Zt(e){if(!i(e.database))throw Error(`Expected a D1 database ID, but received <database>=${JSON.stringify(e.database)}. Database names and binding names are not accepted.`);let t=zt({dir:e.dir,pattern:e.pattern,table:e.table});if(!b.existsSync(t.migrationsPath))throw Error(`No migrations directory at ${t.migrationsPath}.`+(e.dir===void 0?` Pass --dir to point at one.`:``));return{client:await r(e),accountId:e.local?n:await o(),databaseId:e.database,config:t,local:e.local===!0}}async function Qt(e){let{client:t,accountId:n,databaseId:r,config:i}=e;await $(t,n,r,Lt(i.migrationsTableName),`Preparing`,e.local);let a=(await $(t,n,r,Rt(i.migrationsTableName),`Loading`,e.local))[0].results.map(e=>e.name),o=Ut(i);if(o.length===0){let e=Kt(i);e!==void 0&&process.stderr.write(`No files matched --pattern "${i.migrationsPattern}", but "${e}" does match. If an ORM such as drizzle manages your migrations, pass --pattern "${e}".\n`)}return{applied:a,all:o,unapplied:Wt(o,a)}}function $t(e){return Xt(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const en={command:`apply <database>`,describe:`Apply any unapplied D1 migrations`,builder:$t,handler:async e=>{let t=await Zt(e),n=(await Qt(t)).unapplied.map(e=>({name:e,status:`🕒️`}));if(n.length===0)s([],{successLabel:`No migrations to apply`,quiet:e.quiet});else if(await y(`About to apply ${n.length} migration(s)\nYour database may not be available to serve requests during the migration, continue?`)){for(let e of n){let n=Jt({migrationsPath:t.config.migrationsPath,migrationName:e.name,migrationsTableName:t.config.migrationsTableName}),r=!0,i=[];try{let i=await $(t.client,t.accountId,t.databaseId,n,`Applying ${e.name}`,t.local);for(let e of i)e.success||(r=!1)}catch(e){r=!1,i=[e instanceof Error?e.message:String(e)]}if(e.status=r?`✅`:`❌`,i.length>0)throw Error(i.join(`
94
92
  `))}s(n,{quiet:e.quiet})}}};function tn(e){return Yt(e.positional(`message`,{type:`string`,description:`Describes what the migration does`,demandOption:!0}))}const nn={command:`create <message>`,describe:`Create a new empty D1 migration file`,builder:tn,handler:async e=>{if(e.local)throw Error("--local is not supported with `cf d1 migrations create`. This command only creates a migration file on your local filesystem, so you do not need --local.");let t=zt({dir:e.dir,pattern:e.pattern}),n=rn(Gt(t),4),r=e.message.replaceAll(` `,`_`);if(/[\\/]/.test(r))throw Error(`The migration name ${JSON.stringify(e.message)} contains a path separator ("/" or "\\"). Remove it and try again.`);let i=`${n}_${r}.sql`,a=X(`${t.migrationsDir}/${i}`);if(!new Y(t.migrationsPattern,{dot:!1}).match(a))throw Error(`Would create "${a}", but --pattern "${t.migrationsPattern}" would not match it, so \`cf d1 migrations apply\` would skip it.\n\`cf d1 migrations create\` only writes top-level files inside --dir. If you are using an ORM like Drizzle, use \`drizzle-kit generate\` instead — it writes the nested layout your pattern expects.`);if(!b.existsSync(t.migrationsPath)){if(!await y(`No migrations folder found.\nOk to create ${t.migrationsPath}?`))throw Error(`No migrations folder present at ${t.migrationsPath}.`);b.mkdirSync(t.migrationsPath,{recursive:!0})}let o=x.join(t.migrationsPath,i);b.writeFileSync(o,`-- Migration number: ${n} \t ${(/* @__PURE__ */ new Date()).toISOString()}\n`),s({name:i,path:o},{successLabel:`Created ${i}`,quiet:e.quiet})}};function rn(e,t){let n=e.toString();for(;n.length<t;)n=`0`+n;return n}function an(e){return Xt(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const on={command:`list <database>`,describe:`View a list of unapplied migration files`,builder:an,handler:async e=>{let{unapplied:t}=await Qt(await Zt(e));s(t.map(e=>({Name:e})),{quiet:e.quiet})}},sn={command:`migrations`,describe:`Create, list, and apply D1 database migrations`,builder:e=>e.command(u(en,{command:`d1 migrations apply`,classification:{safeFlags:[]}})).command(u(nn,{command:`d1 migrations create`,classification:{safeFlags:[]}})).command(u(on,{command:`d1 migrations list`,classification:{safeFlags:[]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},cn={command:`d1`,describe:`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,builder:e=>e.command(ne).command(ae).command(ce).command(de).command(me).command(ge).command(ve).command(Oe).command(je).command(t(sn,`preview`)).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{cn as default};
package/dist/delegate.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,i as t,n,r,t as i}from"./delegate-Tgfxa-MZ.mjs";export{i as DELEGATION_SENTINEL,n as isEphemeralExecRun,r as maybeDelegateFromProcess,t as maybeDelegateToLocalInstall,e as resolveDelegateTarget};
2
+ export{t as DELEGATION_SENTINEL,n as isEphemeralExecRun,r as maybeDelegateFromProcess,i as maybeDelegateToLocalInstall,a as resolveDelegateTarget}from"./delegate-Tgfxa-MZ.mjs";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./shared-zePemxHi.mjs";function n(t){return e(t).option(`provision`,{type:`boolean`,description:`Automatically provision resources for bindings that need them`,default:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const r={command:`deploy`,describe:`Deploy a worker to Cloudflare`,builder:n,handler:async e=>{await t(e,{command:`Deploy`})}};export{r as default};
2
+ import{n as e,t}from"./shared-CWBjMZDR.mjs";function n(t){return e(t).option(`provision`,{type:`boolean`,description:`Automatically provision resources for bindings that need them`,default:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const r={command:`deploy`,describe:`Deploy a worker to Cloudflare`,builder:n,handler:async e=>{await t(e,{command:`Deploy`})}};export{r as default};