cf 1.0.0-beta.10 → 1.0.0-beta.12

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 (445) hide show
  1. package/bin/cf +1 -1
  2. package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
  3. package/dist/{access-D4DN4XZF.mjs → access-DwJm1qet.mjs} +1 -1
  4. package/dist/account-tags-d0RkEw6s.mjs +15 -0
  5. package/dist/accounts-BSd4b-1j.mjs +138 -0
  6. package/dist/{acm-OQqE8FMc.mjs → acm-BfI0p2sX.mjs} +8 -8
  7. package/dist/addressing-lfeJf7YB.mjs +93 -0
  8. package/dist/agent-context-DFEgYjEQ.mjs +2 -0
  9. package/dist/agent-memory-CP1qpn-y.mjs +34 -0
  10. package/dist/ai-audit-B_tSl78A.mjs +6 -0
  11. package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
  12. package/dist/ai-jFzFBANM.mjs +29 -0
  13. package/dist/ai-search-PTlpY1T9.mjs +79 -0
  14. package/dist/ai-security-CKGE547U.mjs +10 -0
  15. package/dist/alerting-CuxoqG3S.mjs +56 -0
  16. package/dist/analytics-NPND7aHB.mjs +20 -0
  17. package/dist/analytics_engine-BoapM9wd.mjs +4 -0
  18. package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
  19. package/dist/{api-security-CSuYMpMO.mjs → api-security-Nk_bg-Kg.mjs} +61 -61
  20. package/dist/{argo-DMfNmOV4.mjs → argo-DYfLQhd2.mjs} +5 -5
  21. package/dist/artifacts-BS6cEqCB.mjs +43 -0
  22. package/dist/{audit-logs-BrjNuiLx.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
  23. package/dist/auth-AobvBmz4.mjs +2 -0
  24. package/dist/auth-CBtzZ3Sw.mjs +2 -0
  25. package/dist/auth-CKotxfap.mjs +2 -0
  26. package/dist/auth-token-CtguMdmF.mjs +8 -0
  27. package/dist/autoconfig-PfnbLuEO.mjs +532 -0
  28. package/dist/{banner-ClclgnBn.mjs → banner-D03JEqRs.mjs} +1 -1
  29. package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
  30. package/dist/billing-CDMc4tvX.mjs +23 -0
  31. package/dist/bot-management-UrCM3P8K.mjs +9 -0
  32. package/dist/botnet-feed-CVwRm42k.mjs +11 -0
  33. package/dist/brand-protection-DfNf5REj.mjs +27 -0
  34. package/dist/browser-run-DVaiBLYX.mjs +46 -0
  35. package/dist/build-BKPVP5ip.mjs +2 -0
  36. package/dist/build-C4giET85.mjs +2 -0
  37. package/dist/builds-BG5DHqU3.mjs +71 -0
  38. package/dist/cache-C05hHXUp.mjs +45 -0
  39. package/dist/{certificate-authorities-D_uAJH9B.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
  40. package/dist/cf-B9aqZZKD.mjs +18 -0
  41. package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
  42. package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
  43. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
  44. package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
  45. package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
  46. package/dist/{cli-BeXSqJAj.mjs → cli-D9qlPB-6.mjs} +1 -1
  47. package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
  48. package/dist/{client-certificates-DqFcK_s1.mjs → client-certificates-B-m8rfM9.mjs} +7 -7
  49. package/dist/{client-side-security-DJXZ1XAu.mjs → client-side-security-M4oIUqID.mjs} +15 -15
  50. package/dist/cloud-connector-B63Dwn6n.mjs +6 -0
  51. package/dist/cloudflared-B48cfu95.mjs +2 -0
  52. package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
  53. package/dist/{command-xU78ACNA.mjs → command-BQpXcGKV.mjs} +1 -1
  54. package/dist/{command-DUafPVUr.mjs → command-BWlpCtHe.mjs} +1 -1
  55. package/dist/{command-BOLlvEan.mjs → command-BlGILcTA.mjs} +1 -1
  56. package/dist/{command-K1-DZFJS.mjs → command-CKQlxypn.mjs} +1 -1
  57. package/dist/{command-C__qB2mo.mjs → command-CRl00uA2.mjs} +1 -1
  58. package/dist/{command-DZookrfw.mjs → command-CUkXxZsc.mjs} +1 -1
  59. package/dist/command-CXxh5Hce.mjs +2 -0
  60. package/dist/{command-BCag-xjk.mjs → command-CzvlHvov.mjs} +1 -1
  61. package/dist/{command-DxSJy_ym.mjs → command-DBaNgfA4.mjs} +1 -1
  62. package/dist/command-DEQSv-S1.mjs +2 -0
  63. package/dist/{command-BrHTpaji.mjs → command-DyE8v4sd.mjs} +1 -1
  64. package/dist/command-Rv2MR-eh.mjs +2 -0
  65. package/dist/{command-B6DqnUwt.mjs → command-SS1z_t68.mjs} +1 -1
  66. package/dist/{command-6YTtWltE.mjs → command-VuxpEvmH.mjs} +1 -1
  67. package/dist/{command-DzHL5LKI.mjs → command-ZBQ1WITj.mjs} +1 -1
  68. package/dist/{completions-Cm9brGAI.mjs → completions-lf50FBGm.mjs} +2 -2
  69. package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
  70. package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
  71. package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
  72. package/dist/connectors-0UwPUav-.mjs +15 -0
  73. package/dist/containers-DRzgE46U.mjs +375 -0
  74. package/dist/containers-DuIsM7lM.mjs +78 -0
  75. package/dist/{content-scan-C_ROsbTJ.mjs → content-scan-COyTz0Wb.mjs} +8 -8
  76. package/dist/{context-CEOHpZgd.mjs → context-Bwkz4Lm_.mjs} +2 -2
  77. package/dist/{cps-BPQqyL2E.mjs → cps-B7_BJaAU.mjs} +3 -3
  78. package/dist/{csamScanner-D-oO5cxT.mjs → csamScanner-jez2EYXC.mjs} +3 -3
  79. package/dist/ct-alerting-CACDrY0E.mjs +5 -0
  80. package/dist/{custom-certificates-DvnFBZdJ.mjs → custom-certificates-BBd92YlF.mjs} +8 -8
  81. package/dist/{custom-csrs-BZ8TXbuQ.mjs → custom-csrs-DTwBiNMX.mjs} +6 -6
  82. package/dist/{custom-hostnames-CTqf-KlT.mjs → custom-hostnames-DIWlqvN9.mjs} +15 -15
  83. package/dist/custom-nameservers-DISy8v8u.mjs +9 -0
  84. package/dist/custom-pages-BHXO_NFv.mjs +21 -0
  85. package/dist/d1-MvAQMvvo.mjs +89 -0
  86. package/dist/{dcv-delegation-yOtz90qE.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
  87. package/dist/delegate.mjs +1 -1
  88. package/dist/{deploy-C4p6SzLH.mjs → deploy-BS47vZvJ.mjs} +1 -1
  89. package/dist/deploy-context-Cfushp8j.mjs +56 -0
  90. package/dist/{deploy-input-DTjBGloL.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
  91. package/dist/{dev-BML-bpNU.mjs → dev-D8FGPKRt.mjs} +2 -2
  92. package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
  93. package/dist/{dialog-BlUXJKbA.mjs → dialog-CL1Zy4pn.mjs} +1 -1
  94. package/dist/discover-DIDEGKo3.mjs +2 -0
  95. package/dist/discover-P20XeGBF.mjs +2 -0
  96. package/dist/{dist-DW47TUGh.mjs → dist-8rP3V95o.mjs} +5 -5
  97. package/dist/dist-CYFkGHYv.mjs +487 -0
  98. package/dist/dls-8D00tqvC.mjs +17 -0
  99. package/dist/{dns-C9sUPsNt.mjs → dns-C-A5pwf3.mjs} +68 -68
  100. package/dist/{dns-firewall-EDiT-Zli.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
  101. package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
  102. package/dist/dotenv-DpXaxfho.mjs +4 -0
  103. package/dist/dry-run-DmsbOMF1.mjs +2 -0
  104. package/dist/durable-objects-CnIqbj84.mjs +6 -0
  105. package/dist/{email-auth-BgvoEHJk.mjs → email-auth-v97Md32E.mjs} +3 -3
  106. package/dist/{email-routing-Bggn219w.mjs → email-routing-I29RG4hb.mjs} +24 -24
  107. package/dist/{email-security-_t7rzrzd.mjs → email-security-BCarmbky.mjs} +86 -86
  108. package/dist/email-sending-CsHk2HAJ.mjs +47 -0
  109. package/dist/error-sanitization-BWnGnB73.mjs +2 -0
  110. package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
  111. package/dist/errors-_sob7Ihu.mjs +3 -0
  112. package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
  113. package/dist/{firewall-CZEN8iA_.mjs → firewall-DpgFqJr3.mjs} +19 -19
  114. package/dist/flagship-BVaXXlsX.mjs +28 -0
  115. package/dist/{fraud-9_9hobAh.mjs → fraud-B5GQdEF2.mjs} +3 -3
  116. package/dist/{generate-CLqGOlOx.mjs → generate-CeeWW3eX.mjs} +1 -1
  117. package/dist/generate-D80-1GnZ.mjs +2 -0
  118. package/dist/{google-tag-gateway-O_N0vHRY.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
  119. package/dist/gt-3bcLGJ7V.mjs +3 -0
  120. package/dist/{healthchecks-Bt3Gw_JZ.mjs → healthchecks-BwYMnKSF.mjs} +12 -12
  121. package/dist/{hostnames-DdOube3R.mjs → hostnames-DhrGRFeI.mjs} +6 -6
  122. package/dist/{hyperdrive-C14NAh9l.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
  123. package/dist/iam-sRKDU2Z3.mjs +52 -0
  124. package/dist/images-DXdekLVs.mjs +71 -0
  125. package/dist/index.mjs +1 -1
  126. package/dist/init-j47MT4Qe.mjs +39 -0
  127. package/dist/intel-CnVeSjIS.mjs +76 -0
  128. package/dist/interactive-Dqv0RWVU.mjs +42 -0
  129. package/dist/interactive-Wpd3FcDc.mjs +2 -0
  130. package/dist/{ips-PT_uQKAf.mjs → ips-COCUG8mk.mjs} +2 -2
  131. package/dist/k2-CmHkArHL.mjs +13 -0
  132. package/dist/{keyless-certificates-BHvas2q1.mjs → keyless-certificates-l2_S__h3.mjs} +7 -7
  133. package/dist/keys-CDZreums.mjs +4 -0
  134. package/dist/kv-DkpKVimq.mjs +15 -0
  135. package/dist/{lazy-command-glNW3jzf.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
  136. package/dist/{leaked-credential-checks-De9hI1rl.mjs → leaked-credential-checks-edbapECI.mjs} +10 -10
  137. package/dist/lifecycle-oud60haK.mjs +2 -0
  138. package/dist/{load-balancers-Cs6bUHS1.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
  139. package/dist/{local-B5oRPTEN.mjs → local-C0lQ9sTg.mjs} +1 -1
  140. package/dist/local-D5L5Bwju.mjs +2 -0
  141. package/dist/{local-runtime-CZnegFEM.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
  142. package/dist/login-BrjOuHKu.mjs +5 -0
  143. package/dist/login-DeOM4v0L.mjs +2 -0
  144. package/dist/logo-matches-CF8321pb.mjs +6 -0
  145. package/dist/logos-Bd8xNRKW.mjs +7 -0
  146. package/dist/logpush-BYk3qqwY.mjs +46 -0
  147. package/dist/logs-Jcj2NN8H.mjs +36 -0
  148. package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
  149. package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
  150. package/dist/magic-transit-KDyfUgTv.mjs +383 -0
  151. package/dist/managed-defense-CxaDeNUd.mjs +18 -0
  152. package/dist/{managed-transforms-CCpUz4TY.mjs → managed-transforms-C7rT5E-x.mjs} +5 -5
  153. package/dist/{matches-BSiYXs99.mjs → matches-BtKqG8T9.mjs} +3 -3
  154. package/dist/{mcp-CCMiS75R.mjs → mcp-QDd1Iyc0.mjs} +17 -17
  155. package/dist/mesh-DtrIzl5z.mjs +26 -0
  156. package/dist/metadata-Df5kCWJv.mjs +2 -0
  157. package/dist/{migrate-BJ9Go_wP.mjs → migrate-DHlfR_gZ.mjs} +1 -1
  158. package/dist/{monetization-CFf_lb6x.mjs → monetization-pLalYYMI.mjs} +11 -11
  159. package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
  160. package/dist/network-DrJxPWXQ.mjs +50 -0
  161. package/dist/{network-interconnects-YiRUBbjx.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
  162. package/dist/{oauth-cNZUky3h.mjs → oauth-B08YQ4xq.mjs} +2 -2
  163. package/dist/{oauth-DxGgIwFc.mjs → oauth-TGbM1Q0V.mjs} +1 -1
  164. package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
  165. package/dist/{oauth-scopes-xl-pcWdg.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
  166. package/dist/observability-CvN9oxAo.mjs +80 -0
  167. package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
  168. package/dist/{organization-Dbom1gTR.mjs → organization-DIwqRBBV.mjs} +16 -16
  169. package/dist/{organizations-OUMVsuen.mjs → organizations-Dk0D9ukm.mjs} +2 -2
  170. package/dist/{origin-ca-certificates-B3-T0-Nn.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
  171. package/dist/{origin-post-quantum-encryption-CGB6AfPa.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
  172. package/dist/{origin-tls-client-auth-CgzzfAWr.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +16 -16
  173. package/dist/output-BGqhvqe2.mjs +2 -0
  174. package/dist/{page-rules-B9BQKU4_.mjs → page-rules-BKaU37cM.mjs} +8 -8
  175. package/dist/pages-2Xg-lrMf.mjs +54 -0
  176. package/dist/pay-per-crawl-5-KTQXRr.mjs +65 -0
  177. package/dist/pay-per-use-sGebKzNK.mjs +6 -0
  178. package/dist/pipelines-BM-T7mMK.mjs +44 -0
  179. package/dist/precursor-DmQ32-Sp.mjs +4 -0
  180. package/dist/previews-DDQ9ACDJ.mjs +4 -0
  181. package/dist/{progress-A61dRbXl.mjs → progress-BYVZuEcG.mjs} +1 -1
  182. package/dist/{prompt-CGUzvBgY.mjs → prompt-F5wxc8zq.mjs} +1 -1
  183. package/dist/queries-DPBkVynK.mjs +9 -0
  184. package/dist/queues-CCXRs98q.mjs +57 -0
  185. package/dist/r2-BKuBSW8h.mjs +125 -0
  186. package/dist/{radar-CU4T02Ag.mjs → radar-Gv1yFoRX.mjs} +150 -150
  187. package/dist/raw-fetch-DyYWa923.mjs +2 -0
  188. package/dist/realtime-CVl-rvgx.mjs +172 -0
  189. package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
  190. package/dist/registrar-swlnh22i.mjs +43 -0
  191. package/dist/{registry-Cg5lP8oo.mjs → registry-C20J1MW0.mjs} +1 -1
  192. package/dist/reporting-Bgwsvol1.mjs +14 -0
  193. package/dist/request-headers-CUee83pa.mjs +2 -0
  194. package/dist/request-tracers-BBiJvVDz.mjs +4 -0
  195. package/dist/resolve-DvxgnWjL.mjs +2 -0
  196. package/dist/resolve-qwL1LmKN.mjs +2 -0
  197. package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
  198. package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
  199. package/dist/rules-BDunCGMj.mjs +18 -0
  200. package/dist/{rulesets-HOOnxHZZ.mjs → rulesets-BMGxrnv9.mjs} +20 -20
  201. package/dist/rum-B7XiECe9.mjs +30 -0
  202. package/dist/run-CrZgB8L_.mjs +2 -0
  203. package/dist/run-nNxXb_Cv.mjs +2 -0
  204. package/dist/schema-DC0kdqgV.mjs +2 -0
  205. package/dist/schema-flags-BUZR9SLd.mjs +5 -0
  206. package/dist/scim-CORcs2wK.mjs +18 -0
  207. package/dist/secrets-store-BoZQaFey.mjs +24 -0
  208. package/dist/security-insights-DblK_6sg.mjs +40 -0
  209. package/dist/{security-txt-Fnl3LdSn.mjs → security-txt-Dl7RPnRb.mjs} +5 -5
  210. package/dist/{session-CZTuHcbm.mjs → session-BWe9et4K.mjs} +1 -1
  211. package/dist/shared-0N31BXkY.mjs +2 -0
  212. package/dist/{smart-shield-DB0E7cZI.mjs → smart-shield-DX0-8ruu.mjs} +13 -13
  213. package/dist/snippets-BFN-Lg3K.mjs +20 -0
  214. package/dist/source-mXUcrTVw.mjs +6 -0
  215. package/dist/spawn-DZ9A-xXb.mjs +10 -0
  216. package/dist/{spectrum-DtG0jYjE.mjs → spectrum-HYWLWB0X.mjs} +12 -12
  217. package/dist/{speed-B-RiNHGK.mjs → speed-Dj0YhfRe.mjs} +13 -13
  218. package/dist/src-CAiZlihY.mjs +117 -0
  219. package/dist/{ssl-DBVpCZAM.mjs → ssl-BQL1fNtD.mjs} +17 -17
  220. package/dist/startup-profile-0X5ebbng.mjs +29 -0
  221. package/dist/startup-profile-CXnsF4c7.mjs +2 -0
  222. package/dist/state-BA2CanJ_.mjs +2 -0
  223. package/dist/{state-BaGRaYow.mjs → state-Dy6-rKNd.mjs} +1 -1
  224. package/dist/stream-DKv2TtZN.mjs +102 -0
  225. package/dist/submit-Byt2KBGI.mjs +4 -0
  226. package/dist/{tags--eph7JbN.mjs → tags-BIBsdG68.mjs} +2 -2
  227. package/dist/telemetry-DBXOMuLh.mjs +2 -0
  228. package/dist/{telemetry-51etasAu.mjs → telemetry-bu3txnIR.mjs} +1 -1
  229. package/dist/{tenant-Bj-He2xO.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
  230. package/dist/{tenant-custom-nameservers-B5IIIwbz.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
  231. package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
  232. package/dist/{tools-BJZ0DDlL.mjs → tools-BbTX7rlM.mjs} +1 -1
  233. package/dist/tunnels-DWcrz9Sf.mjs +29 -0
  234. package/dist/turnstile-2MIGp2ce.mjs +33 -0
  235. package/dist/{ui-BQxRjahW.mjs → ui-YmjF66Ct.mjs} +1 -1
  236. package/dist/update-check-B-CvDAUz.mjs +2 -0
  237. package/dist/update-check-CfB0PNTY.mjs +2 -0
  238. package/dist/update-check-worker.mjs +1 -1
  239. package/dist/url-info-B8udoxlx.mjs +4 -0
  240. package/dist/{url-normalization-BpGDUUQc.mjs → url-normalization-C6AdWtaE.mjs} +5 -5
  241. package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
  242. package/dist/{user-B6P5_OjP.mjs → user-BLZ-0Bgv.mjs} +51 -51
  243. package/dist/values-BUK-m0Jg.mjs +4 -0
  244. package/dist/vectorize-DEUSEQXY.mjs +32 -0
  245. package/dist/version-BZNc7Y3t.mjs +2 -0
  246. package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
  247. package/dist/{web-assets-yaKxN4w_.mjs → web-assets-CLZdWOmN.mjs} +35 -35
  248. package/dist/{web3-Bu9c_QAt.mjs → web3-DjeavuLg.mjs} +15 -15
  249. package/dist/workers-C_SfyU-v.mjs +38 -0
  250. package/dist/workers-builds-COn5Ne5G.mjs +14 -0
  251. package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
  252. package/dist/{workers-vpc-C1oUHHqk.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
  253. package/dist/workflows-BibtWuOx.mjs +43 -0
  254. package/dist/{wrangler-migration-CJEb9hY3.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
  255. package/dist/zaraz-BvQZB0YY.mjs +22 -0
  256. package/dist/zero-trust-FStq4uhn.mjs +821 -0
  257. package/dist/{zone-uJwRLSnn.mjs → zone-tymlghWb.mjs} +2 -2
  258. package/dist/{zones-Dpofsnth.mjs → zones-Bz6dgT9_.mjs} +47 -47
  259. package/package.json +25 -21
  260. package/dist/abuse-reports-BhSTEz7h.mjs +0 -24
  261. package/dist/account-tags-BWEIZLID.mjs +0 -15
  262. package/dist/accounts-ZQvIqGJz.mjs +0 -138
  263. package/dist/addressing-DCFm17JQ.mjs +0 -93
  264. package/dist/agent-context-GRiQ4zRU.mjs +0 -2
  265. package/dist/agent-memory-BtfPt2me.mjs +0 -34
  266. package/dist/ai-B0_sZbmy.mjs +0 -29
  267. package/dist/ai-audit-DaubuhYF.mjs +0 -6
  268. package/dist/ai-gateway-CJ-1Dzzr.mjs +0 -82
  269. package/dist/ai-search-Dywa1kqX.mjs +0 -79
  270. package/dist/ai-security-2wxMPqKS.mjs +0 -10
  271. package/dist/alerting-yad9DYRv.mjs +0 -56
  272. package/dist/analytics-DKNw2fVc.mjs +0 -20
  273. package/dist/analytics_engine-BA3kF46s.mjs +0 -4
  274. package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
  275. package/dist/artifacts-Cb3hwClm.mjs +0 -43
  276. package/dist/auth-BBlAI8HG.mjs +0 -2
  277. package/dist/auth-BIr56Mbx.mjs +0 -8
  278. package/dist/autoconfig-DPUztTL2.mjs +0 -511
  279. package/dist/basin-catalog-BLsQhJP4.mjs +0 -46
  280. package/dist/billing-CRwD7oQS.mjs +0 -23
  281. package/dist/bot-management-CyW8F8Wm.mjs +0 -9
  282. package/dist/botnet-feed-BBKsxf3Y.mjs +0 -11
  283. package/dist/brand-protection-DSeD8LXl.mjs +0 -27
  284. package/dist/browser-run-BAcUTwB4.mjs +0 -46
  285. package/dist/build-B5UYMEQH.mjs +0 -2
  286. package/dist/build-DLZ9gBNA.mjs +0 -2
  287. package/dist/builds-W1HEG7Bv.mjs +0 -71
  288. package/dist/cache-B7E_PXUp.mjs +0 -45
  289. package/dist/cf-Bh_fTFIj.mjs +0 -18
  290. package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +0 -97
  291. package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +0 -2
  292. package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
  293. package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +0 -2
  294. package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
  295. package/dist/cloud-connector-Czg1GdQi.mjs +0 -6
  296. package/dist/cloudflared-DGuau-lC.mjs +0 -2
  297. package/dist/cloudforce-one-B1IhIZcp.mjs +0 -447
  298. package/dist/command-CAtsHc1V.mjs +0 -2
  299. package/dist/command-DfffeX-k.mjs +0 -2
  300. package/dist/command-TCklVvOY.mjs +0 -2
  301. package/dist/connector-interrupts-D93KTMkw.mjs +0 -6
  302. package/dist/connector-telemetry-events-D6CmKR14.mjs +0 -6
  303. package/dist/connector-telemetry-snapshots-WO9IUk0e.mjs +0 -6
  304. package/dist/connectors-DNT6GTW3.mjs +0 -15
  305. package/dist/containers-Btx7vCDP.mjs +0 -78
  306. package/dist/containers-Ce7IO-Ia.mjs +0 -239
  307. package/dist/ct-alerting-CnTRE1Fb.mjs +0 -5
  308. package/dist/custom-nameservers-B0CpnUVg.mjs +0 -9
  309. package/dist/custom-pages-DcoSGN56.mjs +0 -21
  310. package/dist/d1-m7UfzBzl.mjs +0 -41
  311. package/dist/diagnostics-hOvnx5DT.mjs +0 -15
  312. package/dist/discover-C5aiI6u0.mjs +0 -2
  313. package/dist/discover-DwczTkRX.mjs +0 -2
  314. package/dist/dist-BuCJ_55d.mjs +0 -366
  315. package/dist/dist-C3s9SXTd.mjs +0 -48
  316. package/dist/dls-v6DyEWTd.mjs +0 -17
  317. package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +0 -2
  318. package/dist/dotenv-CcQjGlV0.mjs +0 -4
  319. package/dist/dry-run-Bq0JAsbX.mjs +0 -2
  320. package/dist/durable-objects-C01phVwL.mjs +0 -6
  321. package/dist/email-sending-_dKCs2VF.mjs +0 -47
  322. package/dist/error-sanitization-CJ5OLJrh.mjs +0 -2
  323. package/dist/error-sanitization-hmi1CqE5.mjs +0 -2
  324. package/dist/fieldExtractors-Cm5QnkE0.mjs +0 -9
  325. package/dist/flagship-B_SAI_ZL.mjs +0 -28
  326. package/dist/generate-BPqoDbck.mjs +0 -2
  327. package/dist/gt-DmcMNPX6.mjs +0 -2
  328. package/dist/iam-DUW7neMx.mjs +0 -52
  329. package/dist/images-B9dnr1z0.mjs +0 -71
  330. package/dist/init-BGcAIvV7.mjs +0 -39
  331. package/dist/intel-BQpZMck3.mjs +0 -76
  332. package/dist/interactive-C-o16XQs.mjs +0 -32
  333. package/dist/interactive-SgAjen2z.mjs +0 -2
  334. package/dist/k2-nPYti7Y0.mjs +0 -13
  335. package/dist/keys-O5kAW9ox.mjs +0 -4
  336. package/dist/kv-BUP_ZLM_.mjs +0 -15
  337. package/dist/lifecycle-C7tAC1Mn.mjs +0 -2
  338. package/dist/local-Bj-l0TP6.mjs +0 -2
  339. package/dist/login-C5nSIS-T.mjs +0 -2
  340. package/dist/login-CUup7w0e.mjs +0 -5
  341. package/dist/logo-matches-BkQKdu4Z.mjs +0 -6
  342. package/dist/logos-C_sv-boo.mjs +0 -7
  343. package/dist/logpush-NUcyMKHi.mjs +0 -46
  344. package/dist/logs-BZT4PlqZ.mjs +0 -36
  345. package/dist/magic-cloud-networking-DQnSdmgA.mjs +0 -71
  346. package/dist/magic-network-monitoring-pHTU6aS8.mjs +0 -36
  347. package/dist/magic-transit-5302bQNh.mjs +0 -383
  348. package/dist/managed-defense-8OEfDzuO.mjs +0 -18
  349. package/dist/mesh-DKBGTlCD.mjs +0 -26
  350. package/dist/metadata-C33s4rc-.mjs +0 -2
  351. package/dist/mtls-certificates-DsF3NFNs.mjs +0 -13
  352. package/dist/network-Bm0qYRqY.mjs +0 -50
  353. package/dist/oauth-clients-CP6alY0_.mjs +0 -16
  354. package/dist/observability-Bp71PtlD.mjs +0 -80
  355. package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +0 -4
  356. package/dist/output-CvQFJkvi.mjs +0 -2
  357. package/dist/pages-DZPdyuT4.mjs +0 -54
  358. package/dist/pay-per-crawl-CnveMVDi.mjs +0 -65
  359. package/dist/pay-per-use-Bpxe8PHv.mjs +0 -6
  360. package/dist/pipelines-CHev3o5G.mjs +0 -44
  361. package/dist/precursor-C9PK9Bue.mjs +0 -4
  362. package/dist/previews-BIMI1dTz.mjs +0 -4
  363. package/dist/queries-f-btyefs.mjs +0 -9
  364. package/dist/queues-kLNdeb3q.mjs +0 -57
  365. package/dist/r2-D_awYx2p.mjs +0 -125
  366. package/dist/raw-fetch-CvkmFO23.mjs +0 -2
  367. package/dist/realtime-C0dvcBBM.mjs +0 -172
  368. package/dist/registrar-CHc-4vcf.mjs +0 -43
  369. package/dist/registrar-sandbox-Dq8LV2AI.mjs +0 -56
  370. package/dist/reporting-4u21g6Dk.mjs +0 -14
  371. package/dist/request-headers-D31kdxrQ.mjs +0 -2
  372. package/dist/request-tracers-CupJ_83j.mjs +0 -4
  373. package/dist/resolve-BCTrtcx7.mjs +0 -2
  374. package/dist/resolve-PZuJ878-.mjs +0 -2
  375. package/dist/resource-sharing-CO-Lh-u7.mjs +0 -40
  376. package/dist/resource-tagging-D0R5SzR6.mjs +0 -4
  377. package/dist/rules-BsmKzB9H.mjs +0 -18
  378. package/dist/rum-wcLEvVJl.mjs +0 -30
  379. package/dist/run-CIJTelJL.mjs +0 -2
  380. package/dist/run-quhbAvQi.mjs +0 -2
  381. package/dist/schema-GdBsV4P7.mjs +0 -2
  382. package/dist/schema-flags-D8vL2oiF.mjs +0 -5
  383. package/dist/scim-BkdJmAS8.mjs +0 -18
  384. package/dist/sdk-BCzcRJCi.mjs +0 -3
  385. package/dist/secrets-store-CHs0oYA0.mjs +0 -24
  386. package/dist/security-insights-vsl-4xFa.mjs +0 -40
  387. package/dist/shared-BS30oCf8.mjs +0 -2
  388. package/dist/snippets-CFaF_NyG.mjs +0 -20
  389. package/dist/source-38bULAR8.mjs +0 -6
  390. package/dist/spawn-B0Sl8lUu.mjs +0 -10
  391. package/dist/src-CM3XaB4p.mjs +0 -109
  392. package/dist/startup-profile-CLmojOrn.mjs +0 -2
  393. package/dist/startup-profile-CR7GMuLx.mjs +0 -17
  394. package/dist/state-CpXhcMdX.mjs +0 -2
  395. package/dist/stream-cAdBvpS1.mjs +0 -102
  396. package/dist/submit-Bkd7l2rK.mjs +0 -4
  397. package/dist/telemetry-Q3_UmwHj.mjs +0 -2
  398. package/dist/tunnels-CgtuRpcD.mjs +0 -29
  399. package/dist/turnstile-Bmcnrzw7.mjs +0 -33
  400. package/dist/update-check-BqSpgzHk.mjs +0 -2
  401. package/dist/update-check-DC0qP_8z.mjs +0 -2
  402. package/dist/url-info-DhVehaT8.mjs +0 -4
  403. package/dist/url-scanner-DiLdqsQk.mjs +0 -16
  404. package/dist/values-Cxx4Lxrd.mjs +0 -4
  405. package/dist/vectorize-YyxVpql-.mjs +0 -32
  406. package/dist/version-C0pInAZ9.mjs +0 -2
  407. package/dist/waiting-rooms-BdahlCdD.mjs +0 -53
  408. package/dist/workers-5GgoGA2e.mjs +0 -38
  409. package/dist/workers-builds-h-1FJjE1.mjs +0 -14
  410. package/dist/workers-for-platforms-CV9iRrp9.mjs +0 -42
  411. package/dist/workflows-dtMlkj1-.mjs +0 -43
  412. package/dist/zaraz-838AbMEX.mjs +0 -22
  413. package/dist/zero-trust-CYt-eELJ.mjs +0 -821
  414. /package/dist/{Page-CjJht2qT.mjs → Page-BShsqCXr.mjs} +0 -0
  415. /package/dist/{alerts-DY_7Nknx.mjs → alerts-BSON-vFh.mjs} +0 -0
  416. /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
  417. /package/dist/{autorag-K396-M2S.mjs → autorag-kNrLiqDX.mjs} +0 -0
  418. /package/dist/{body-parser-hh2avzkz.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
  419. /package/dist/{brands-DeLbFxSt.mjs → brands-bBJgbbOH.mjs} +0 -0
  420. /package/dist/{browser-extension-C1zmKFDG.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
  421. /package/dist/{clear-CRfI7WS7.mjs → clear-BW9vLgI3.mjs} +0 -0
  422. /package/dist/{cli-types-DoVT5q_M.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
  423. /package/dist/{connector-telemetry-events-latest-D8p_dR8s.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
  424. /package/dist/{connector-telemetry-snapshots-latest-COFmzmlk.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
  425. /package/dist/{delegate-B6LetRpZ.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
  426. /package/dist/{domain-info-aiwP60Fo.mjs → domain-info-BkcBcyfF.mjs} +0 -0
  427. /package/dist/{health-Bz33n-_F.mjs → health-CTaCeVyC.mjs} +0 -0
  428. /package/dist/{input-validation-Dk52b0me.mjs → input-validation-D7z60HJH.mjs} +0 -0
  429. /package/dist/{internal-BHrJbbdA.mjs → internal-BYS7hO8c.mjs} +0 -0
  430. /package/dist/{live-MeJQXIei.mjs → live-BJE_YWE1.mjs} +0 -0
  431. /package/dist/{project-settings-DO6njFg_.mjs → project-settings-nBMEx1f-.mjs} +0 -0
  432. /package/dist/{r2-data-catalog-2jQrdAdo.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
  433. /package/dist/{rate-limit-analytics-CU55zqCU.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
  434. /package/dist/{rate-limits-CZ-qHDPK.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
  435. /package/dist/{ready-BOpbZ1pN.mjs → ready-B3pLxnjc.mjs} +0 -0
  436. /package/dist/{recent-submissions-KDqD2HyS.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
  437. /package/dist/{refute-DkF4XIMw.mjs → refute-Dp3VodMn.mjs} +0 -0
  438. /package/dist/{scan-logo-DQkf6glG.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
  439. /package/dist/{scan-page-CMOJ_E0n.mjs → scan-page-CxeudOzj.mjs} +0 -0
  440. /package/dist/{search-Bre1Zwn3.mjs → search-B_P5ZTQj.mjs} +0 -0
  441. /package/dist/{signed-url-24ZbX4yV.mjs → signed-url-D5RwvrQq.mjs} +0 -0
  442. /package/dist/{submission-info-BmkbZVqM.mjs → submission-info-_t78q2OE.mjs} +0 -0
  443. /package/dist/{total-queries-j8OAF_cE.mjs → total-queries-CPrKEciQ.mjs} +0 -0
  444. /package/dist/{tracked-domains-fe3EWYmF.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
  445. /package/dist/{verify-CKgZYvln.mjs → verify-5KcvRk-q.mjs} +0 -0
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage(`$0 ct-alerting get
3
-
4
- Retrieve the Certificate Transparency alerting subscription settings for a zone. Returns whether CT monitoring is enabled and the list of email addresses that receive alerts, if any have been configured.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Get CT Alerting Subscription`,builder:c,handler:async o=>a({command:`ct-alerting get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ct-alerting get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.ctAlerting.get({zone_id:s})),{successLabel:`Loaded`})})};function u(e){return e.usage("$0 ct-alerting update\n\nCreate or update the Certificate Transparency alerting subscription for a zone. Enables or disables email notifications when certificates are issued for the zone's domains. The `enabled` field is required on every request and controls whether the subscription is active. The `emails` field is optional and, when provided, replaces the stored recipient list for the zone. When `emails` is omitted, the stored recipient list is preserved and only the enabled state is toggled. A maximum of 100 email addresses may be configured per zone. Requests that omit `enabled` are rejected with error code 1008. Subscribe and unsubscribe notification emails are only sent for recipients whose effective subscription state changes. Idempotent requests (no state change) send no notification email.").option(`emails`,{type:`string`,array:!0,description:`Email addresses that receive CT alert notifications for the zone. A maximum of 100 addresses may be configured. Each address must be a valid RFC 5322 email address and must not contain a comma.
5
- `}).option(`enabled`,{type:`boolean`,description:`Whether CT alerting is enabled for the zone.`}).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 CT alerting subscription settings.`})}const d={command:`update`,describe:`Update CT Alerting Subscription`,builder:u,handler:async c=>a({command:`ct-alerting update`,classification:{safeFlags:[`enabled`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf ct-alerting update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({emails:c.emails,enabled:c.enabled}):o(c.body)});return}let a=await t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.ctAlerting.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(c.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=s({emails:c.emails,enabled:c.enabled});n(await i(`Updating`,async()=>a.ctAlerting.update({...u,zone_id:l})),{successLabel:`Updated`})})},f={command:`ct-alerting`,describe:`ct-alerting`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-CGUzvBgY.mjs";function m(e){return e.usage(`$0 custom-nameservers create
3
-
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 h={command:`create`,describe:`Add account or zone Custom Nameserver`,builder:m,handler:async p=>c({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({ns_name:d(p[`ns-name`],`ns-name`,`text`),ns_set:p[`ns-set`]}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customNameservers.create({body:e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`ns-name`]===void 0&&(p[`ns-name`]=await f(`ns-name`,`The FQDN of the name server.`));let g=u({ns_name:d(p[`ns-name`],`ns-name`,`text`),ns_set:p[`ns-set`]});a(await s(`Creating`,async()=>c.customNameservers.create({body:g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 custom-nameservers delete <custom-ns-id>
5
-
6
- Removes a custom nameserver from the account.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <custom-ns-id>`,describe:`Delete Account Custom Nameserver`,builder:g,handler:async n=>c({command:`custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){o({command:`cf custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/custom_ns/${n[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(n[`custom-ns-id`]))}`,pathParams:{"custom-ns-id":String(n[`custom-ns-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();if(n.accountId=l,!await p({force:!!n.force})){process.stderr.write(`Aborted.
7
- `);return}a(await s(`Deleting`,async()=>c.customNameservers.delete({account_id:l,custom_ns_id:n[`custom-ns-id`]})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 custom-nameservers get
8
-
9
- List an account or zone's custom nameservers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`List account or zone Custom Nameservers`,builder:v,handler:async l=>c({command:`custom-nameservers get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customNameservers.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})},b={command:`custom-nameservers`,describe:`custom-nameservers`,builder:e=>e.command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-CGUzvBgY.mjs";function h(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
3
-
4
- 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 g={command:`create`,describe:`Create a preview token`,builder:h,handler:async p=>c({command:`custom-pages account-custom-pages preview-tokens create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-pages account-custom-pages preview-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({act:d(p.act,`act`,`text`),target:d(p.target,`target`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p.act===void 0&&(p.act=await f(`act`,`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`)),p.target===void 0&&(p.target=await f(`target`,`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`)),p.url===void 0&&(p.url=await f(`url`,`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`));let g=u({act:d(p.act,`act`,`text`),target:d(p.target,`target`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},_={command:`preview-tokens`,describe:`Preview tokens for account-level custom pages`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 custom-pages account-custom-pages update <identifier>
5
-
6
- 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`]}).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 y={command:`update <identifier>`,describe:`Update a custom page`,builder:v,handler:async m=>c({command:`custom-pages account-custom-pages update`,classification:{safeFlags:[`state`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=m.zone===void 0?await t():void 0,n=m.zone===void 0?`accounts`:`zones`,r=m.zone??e??`<account-id>`;o({command:`cf custom-pages account-custom-pages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/${m.identifier==null?`<identifier>`:encodeURIComponent(String(m.identifier))}`,pathParams:{"account-or-zone":String(n),identifier:String(m.identifier??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:m.body===void 0?u({state:d(m.state,`state`,`text`),url:d(m.url,`url`,`text`)}):l(m.body)});return}let c=await i(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await n({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await r();if(h===`zones`?m.zoneId=g:m.accountId=g,m.body){let e=l(m.body);a(await s(`Updating`,async()=>c.customPages.accountCustomPages.update({...e,account_or_zone:h,account_or_zone_id:g,identifier:m.identifier})),{successLabel:`Updated`});return}m.state===void 0&&(m.state=await p(`state`,`The custom page state.`,[`default`,`customized`])),m.url===void 0&&(m.url=await f(`url`,`The URL associated with the custom page.`));let _=u({state:d(m.state,`state`,`text`),url:d(m.url,`url`,`text`)});a(await s(`Updating`,async()=>c.customPages.accountCustomPages.update({..._,account_or_zone:h,account_or_zone_id:g,identifier:m.identifier})),{successLabel:`Updated`})})},b={command:`account-custom-pages`,describe:`Manage account-level custom pages`,builder:e=>e.command(y).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 custom-pages assets create custom asset
7
-
8
- 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 S={command:`asset`,describe:`Create a custom asset`,builder:x,handler:async p=>c({command:`custom-pages assets create custom asset`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-pages assets create custom asset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({description:d(p.description,`description`,`text`),name:d(p.name,`name`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customPages.assets.create.custom.asset({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p.description===void 0&&(p.description=await f(`description`,`A short description of the custom asset.`)),p.name===void 0&&(p.name=await f(`name`,`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`)),p.url===void 0&&(p.url=await f(`url`,`The URL where the asset content is fetched from.`));let g=u({description:d(p.description,`description`,`text`),name:d(p.name,`name`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Creating`,async()=>c.customPages.assets.create.custom.asset({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},C={command:`custom`,describe:`Operations for assets.create.custom`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`create`,describe:`Operations for assets.create`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 custom-pages assets delete custom asset <asset-name>
9
-
10
- 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 E={command:`asset <asset-name>`,describe:`Delete a custom asset`,builder:T,handler:async l=>c({command:`custom-pages assets delete custom asset`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages assets delete custom asset`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();if(u===`zones`?l.zoneId=d:l.accountId=d,!await m({force:!!l.force})){process.stderr.write(`Aborted.
11
- `);return}a(await s(`Deleting`,async()=>c.customPages.assets.delete.custom.asset({account_or_zone:u,account_or_zone_id:d,asset_name:l[`asset-name`]})),{successLabel:`Deleted`})})},D={command:`custom`,describe:`Operations for assets.delete.custom`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`delete`,describe:`Operations for assets.delete`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 custom-pages assets get custom asset <asset-name>
12
-
13
- 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 A={command:`asset <asset-name>`,describe:`Get a custom asset`,builder:k,handler:async l=>c({command:`custom-pages assets get custom asset`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages assets get custom asset`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customPages.assets.get.custom.asset({account_or_zone:u,account_or_zone_id:d,asset_name:l[`asset-name`]})),{successLabel:`Loaded`})})},j={command:`custom`,describe:`Operations for assets.get.custom`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`get`,describe:`Operations for assets.get`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 custom-pages assets list custom assets
14
-
15
- 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 P={command:`assets`,describe:`List custom assets`,builder:N,handler:async l=>c({command:`custom-pages assets list custom assets`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages assets list custom assets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.customPages.assets.list.custom.assets({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},F={command:`custom`,describe:`Operations for assets.list.custom`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`list`,describe:`Operations for assets.list`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 custom-pages assets update custom asset <asset-name>
16
-
17
- 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 R={command:`asset <asset-name>`,describe:`Update a custom asset`,builder:L,handler:async p=>c({command:`custom-pages assets update custom asset`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-pages assets update custom asset`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/assets/${p[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(p[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"asset-name":String(p[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({description:d(p.description,`description`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Updating`,async()=>c.customPages.assets.update.custom.asset({...e,account_or_zone:m,account_or_zone_id:h,asset_name:p[`asset-name`]})),{successLabel:`Updated`});return}p.description===void 0&&(p.description=await f(`description`,`A short description of the custom asset.`)),p.url===void 0&&(p.url=await f(`url`,`The URL where the asset content is fetched from.`));let g=u({description:d(p.description,`description`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Updating`,async()=>c.customPages.assets.update.custom.asset({...g,account_or_zone:m,account_or_zone_id:h,asset_name:p[`asset-name`]})),{successLabel:`Updated`})})},z={command:`custom`,describe:`Operations for assets.update.custom`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},B={command:`update`,describe:`Operations for assets.update`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`assets`,describe:`Manage account- and zone-level custom assets`,builder:e=>e.command(w).command(O).command(M).command(I).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 custom-pages get <identifier>
18
-
19
- 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 U={command:`get <identifier>`,describe:`Get a custom page`,builder:H,handler:async l=>c({command:`custom-pages get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages/${l.identifier==null?`<identifier>`:encodeURIComponent(String(l.identifier))}`,pathParams:{"account-or-zone":String(n),identifier:String(l.identifier??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customPages.get({account_or_zone:u,account_or_zone_id:d,identifier:l.identifier})),{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 custom-pages list
20
-
21
- 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 G={command:`list`,describe:`List custom pages`,builder:W,handler:async l=>c({command:`custom-pages list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/custom_pages`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customPages.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})},K={command:`custom-pages`,describe:`Manage custom error and challenge pages and their assets for accounts and zones`,builder:e=>e.command(U).command(G).command(b).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B5oRPTEN.mjs";import{n as t}from"./resolve-BCTrtcx7.mjs";import{a as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{n as c,t as l}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as ee,n as h,t as g}from"./prompt-CGUzvBgY.mjs";import{t as te}from"./cli-types-DoVT5q_M.mjs";import _ from"node:fs";import v from"node:path";const y=(e,t,n)=>{let r=e instanceof RegExp?b(e,n):e,i=t instanceof RegExp?b(t,n):t,a=r!==null&&i!=null&&ne(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)}},b=(e,t)=>{let n=t.match(e);return n?n[0]:null},ne=(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},x=`\0SLASH`+Math.random()+`\0`,S=`\0OPEN`+Math.random()+`\0`,C=`\0CLOSE`+Math.random()+`\0`,re=`\0COMMA`+Math.random()+`\0`,ie=`\0PERIOD`+Math.random()+`\0`,ae=new RegExp(x,`g`),oe=new RegExp(S,`g`),se=new RegExp(C,`g`),ce=new RegExp(re,`g`),le=new RegExp(ie,`g`),ue=/\\\\/g,de=/\\{/g,fe=/\\}/g,pe=/\\,/g,me=/\\\./g;function w(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function he(e){return e.replace(ue,x).replace(de,S).replace(fe,C).replace(pe,re).replace(me,ie)}function ge(e){return e.replace(ae,`\\`).replace(oe,`{`).replace(se,`}`).replace(ce,`,`).replace(le,`.`)}function T(e){if(!e)return[``];let t=[],n=y(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=T(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function _e(e,t={}){if(!e)return[];let{max:n=1e5}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),E(he(e),n,!0).map(ge)}function ve(e){return`{`+e+`}`}function ye(e){return/^-?0\d/.test(e)}function be(e,t){return e<=t}function xe(e,t){return e>=t}function E(e,t,n){let r=[],i=y(`{`,`}`,e);if(!i)return[e];let a=i.pre,o=i.post.length?E(i.post,t,!1):[``];if(/\$$/.test(i.pre))for(let e=0;e<o.length&&e<t;e++){let t=a+`{`+i.body+`}`+o[e];r.push(t)}else{let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=s||c,u=i.body.indexOf(`,`)>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+C+i.post,E(e,t,!0)):[e];let d;if(l)d=i.body.split(/\.\./);else if(d=T(i.body),d.length===1&&d[0]!==void 0&&(d=E(d[0],t,!1).map(ve),d.length===1))return o.map(e=>i.pre+d[0]+e);let f;if(l&&d[0]!==void 0&&d[1]!==void 0){let e=w(d[0]),n=w(d[1]),r=Math.max(d[0].length,d[1].length),i=d.length===3&&d[2]!==void 0?Math.max(Math.abs(w(d[2])),1):1,a=be;n<e&&(i*=-1,a=xe);let o=d.some(ye);f=[];for(let s=e;a(s,n)&&f.length<t;s+=i){let e;if(c)e=String.fromCharCode(s),e===`\\`&&(e=``);else if(e=String(s),o){let t=r-e.length;if(t>0){let n=Array(t+1).join(`0`);e=s<0?`-`+n+e.slice(1):n+e}}f.push(e)}}else{f=[];for(let e=0;e<d.length;e++)f.push.apply(f,E(d[e],t,!1))}for(let e=0;e<f.length;e++)for(let i=0;i<o.length&&r.length<t;i++){let t=a+f[e]+o[i];(!n||l||t)&&r.push(t)}}return r}const D=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Se={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},O=e=>e.replace(/[[\]\\-]/g,`\\$&`),Ce=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),k=e=>e.join(``),we=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);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(Se))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(O(d)+`-`+O(t)):t===d&&r.push(O(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(O(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(O(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)return[Ce(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+k(r)+`]`,p=`[`+(l?``:`^`)+k(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},A=(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 j;const Te=new Set([`!`,`?`,`+`,`*`,`@`]),M=e=>Te.has(e),Ee=e=>M(e.type),De=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),Oe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),ke=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),Ae=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),N=`(?!\\.)`,je=new Set([`[`,`.`]),Me=new Set([`..`,`.`]),Ne=new Set(`().*{}+?[]^$\\!`),Pe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),P=`[^/]`,F=P+`*?`,I=P+`+?`;let Fe=0;var L=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++Fe;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(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof j&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof j&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new j(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}else if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&M(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new j(n,t);u=j.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new j(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}else if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&M(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 j(n,d);d.push(o),u=j.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new j(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,Oe)}#m(e,t=De){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=ke){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new j(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!!Ae.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=Ae.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new j(null,void 0,t);return j.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!Ee(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?j.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&Me.has(this.#r[0]))){let n=je,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?N:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,A(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,A(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?N:``)+I;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?N:``)+F+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,A(i),this.#t=!!this.#t,this.#n]}#x(){if(Ee(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);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+=(Ne.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?I:F,t=!0;continue}else o=!1;if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=we(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=P,t=!0;continue}i+=Pe(c)}return[i,A(e),!!t,a]}};j=L;const Ie=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),R=(e,t,n={})=>(D(t),!n.nocomment&&t.charAt(0)===`#`?!1:new q(t,n).match(e)),Le=/^\*+([^+@!?*[(]*)$/,Re=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),ze=e=>t=>t.endsWith(e),Be=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),Ve=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),He=/^\*+\.\*+$/,Ue=e=>!e.startsWith(`.`)&&e.includes(`.`),We=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ge=/^\.\*+$/,Ke=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),qe=/^\*+$/,Je=e=>e.length!==0&&!e.startsWith(`.`),Ye=e=>e.length!==0&&e!==`.`&&e!==`..`,Xe=/^\?+([^+@!?*[(]*)?$/,Ze=([e,t=``])=>{let n=z([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Qe=([e,t=``])=>{let n=B([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},$e=([e,t=``])=>{let n=B([e]);return t?e=>n(e)&&e.endsWith(t):n},et=([e,t=``])=>{let n=z([e]);return t?e=>n(e)&&e.endsWith(t):n},z=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},B=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},V=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,H={win32:{sep:`\\`},posix:{sep:`/`}};R.sep=V===`win32`?H.win32.sep:H.posix.sep;const U=Symbol(`globstar **`);R.GLOBSTAR=U,R.filter=(e,t={})=>n=>R(n,e,t);const W=(e,t={})=>Object.assign({},e,t);R.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return R;let t=R;return Object.assign((n,r,i={})=>t(n,r,W(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,W(e,n))}static defaults(n){return t.defaults(W(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,W(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,W(e,r))}},unescape:(n,r={})=>t.unescape(n,W(e,r)),escape:(n,r={})=>t.escape(n,W(e,r)),filter:(n,r={})=>t.filter(n,W(e,r)),defaults:n=>t.defaults(W(e,n)),makeRe:(n,r={})=>t.makeRe(n,W(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,W(e,r)),match:(n,r,i={})=>t.match(n,r,W(e,i)),sep:t.sep,GLOBSTAR:U})};const G=(e,t={})=>(D(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_e(e,{max:t.braceExpandMax}));R.braceExpand=G,R.makeRe=(e,t={})=>new q(e,t).makeRe(),R.match=(e,t,n={})=>{let r=new q(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const K=/[?*]|[+@!]\(.*?\)|\[|\]/,tt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){D(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||V,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!K.test(e[2]))&&!K.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(U)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(U,i),o=t.lastIndexOf(U),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===U?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let ee=d.length-1,h=e.length-u;for(let e of d)e[1]=h-(m[ee--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===U)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return G(this.pattern,this.options)}parse(e){D(e);let t=this.options;if(e===`**`)return U;if(e===``)return``;let n,r=null;(n=e.match(qe))?r=t.dot?Ye:Je:(n=e.match(Le))?r=(t.nocase?t.dot?Ve:Be:t.dot?ze:Re)(n[1]):(n=e.match(Xe))?r=(t.nocase?t.dot?Qe:Ze:t.dot?$e:et)(n):(n=e.match(He))?r=t.dot?We:Ue:(n=e.match(Ge))&&(r=Ke);let i=L.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?tt(e):e===U?U:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==U||a===U||(a===void 0?i!==void 0&&i!==U?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==U&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=U))});let i=t.filter(e=>e!==U);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return R.defaults(e).Minimatch}};R.AST=L,R.Minimatch=q,R.escape=Ie,R.unescape=A;function J(e){let t=e.replace(/\\/g,`/`),n=v.posix.normalize(t);return n.endsWith(`/`)?n.slice(0,-1):n}function Y(e,t){if(t===`.`)return e;let n=`${t}/`;if(!e.startsWith(n))throw Error(`Expected migrations pattern ${JSON.stringify(e)} to start with ${JSON.stringify(n)}`);return e.slice(n.length)}function X(e){return`"${e.replace(/"/g,`""`)}"`}function nt(e){return`CREATE TABLE IF NOT EXISTS ${X(e)}(
3
- id INTEGER PRIMARY KEY AUTOINCREMENT,
4
- name TEXT UNIQUE,
5
- applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
6
- );`}function rt(e){return`SELECT *
7
- FROM ${X(e)}
8
- ORDER BY id`}function it(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=J(e.dir??`./migrations`),n=J(`${t}/*.sql`),r;if(e.pattern===void 0)r=n;else{r=J(e.pattern);try{Y(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:v.resolve(e.cwd??process.cwd(),t),migrationsDir:t,migrationsPattern:r,migrationsTableName:e.table??`d1_migrations`}}function at(e,t){let n=[],r=[{abs:e,rel:``}];for(;r.length>0;){let{abs:e,rel:i}=r.pop(),a;try{a=_.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:v.join(e,o.name),rel:a}):o.isFile()&&t.match(a)&&n.push(a)}}return n.sort(st)}function Z(e){let t=e.split(`/`)[0]??``;return parseInt(t.split(`_`)[0]??``,10)}function ot(e,t){let n=Z(e),r=Z(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 st(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=ot(n[e]??``,r[e]??``);if(t!==0)return t}return n.length-r.length}function ct(e){let t=Y(e.migrationsPattern,e.migrationsDir);return at(e.migrationsPath,new q(t,{dot:!1}))}function lt(e,t){let n=[];for(let r of e)t.includes(r)||n.push(r);return n}function ut(e){let t=ct(e).map(e=>Z(e)).filter(e=>Number.isFinite(e));return Math.max(...t,0)+1}function dt(e){if(at(e.migrationsPath,new q(`*/migration.sql`,{dot:!1})).length!==0)return J(`${e.migrationsDir}/*/migration.sql`)}function ft(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===`
9
- `?(t+=`
10
- `,a++,r=!1):(t+=o,r=o!==`
11
- `);continue}if(i){o===`\r`&&s===`
12
- `?(t+=`
13
- `,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===`
14
- `){t+=`
15
- `,a++;continue}t+=o}return t}function pt({migrationsPath:e,migrationName:t,migrationsTableName:n}){return`${_.readFileSync(v.join(e,t),`utf8`)}
16
- INSERT INTO ${X(n)} (name)
17
- values ('${t.replace(/'/g,`''`)}');`}function mt(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 Q(e){return mt(e).option(`table`,{type:`string`,description:`Table recording applied migrations`,default:`d1_migrations`})}async function $(e,t,n,r,i,a=!1){return s(i,async()=>{let i={account_id:t,database_id:n,body:{sql:ft(r)}};return a?((await e.d1.raw(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.d1.query(i))?.result??[]})}async function ht(n){if(!t(n.database))throw Error(`Expected a D1 database ID, but received <database>=${JSON.stringify(n.database)}. Database names and binding names are not accepted.`);let a=it({dir:n.dir,pattern:n.pattern,table:n.table});if(!_.existsSync(a.migrationsPath))throw Error(`No migrations directory at ${a.migrationsPath}.`+(n.dir===void 0?` Pass --dir to point at one.`:``));return{client:await i(n),accountId:n.local?e:await r(),databaseId:n.database,config:a,local:n.local===!0}}async function gt(e){let{client:t,accountId:n,databaseId:r,config:i}=e;await $(t,n,r,nt(i.migrationsTableName),`Preparing`,e.local);let a=(await $(t,n,r,rt(i.migrationsTableName),`Loading`,e.local))[0].results.map(e=>e.name),o=ct(i);if(o.length===0){let e=dt(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:lt(o,a)}}function _t(e){return Q(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const vt={command:`apply <database>`,describe:`Apply any unapplied D1 migrations`,builder:_t,handler:async e=>{let t=await ht(e),n=(await gt(t)).unapplied.map(e=>({name:e,status:`🕒️`}));if(n.length===0){a([],{successLabel:`No migrations to apply`,quiet:e.quiet});return}if(await g(`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=pt({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(`
18
- `))}a(n,{quiet:e.quiet})}}};function yt(e){return mt(e.positional(`message`,{type:`string`,description:`Describes what the migration does`,demandOption:!0}))}const bt={command:`create <message>`,describe:`Create a new empty D1 migration file`,builder:yt,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=it({dir:e.dir,pattern:e.pattern}),n=xt(ut(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`,o=J(`${t.migrationsDir}/${i}`);if(!new q(t.migrationsPattern,{dot:!1}).match(o))throw Error(`Would create "${o}", 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(!_.existsSync(t.migrationsPath)){if(!await g(`No migrations folder found.\nOk to create ${t.migrationsPath}?`))throw Error(`No migrations folder present at ${t.migrationsPath}.`);_.mkdirSync(t.migrationsPath,{recursive:!0})}let s=v.join(t.migrationsPath,i);_.writeFileSync(s,`-- Migration number: ${n} \t ${new Date().toISOString()}\n`),a({name:i,path:s},{successLabel:`Created ${i}`,quiet:e.quiet})}};function xt(e,t){let n=e.toString();for(;n.length<t;)n=`0`+n;return n}function St(e){return Q(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const Ct={command:`list <database>`,describe:`View a list of unapplied migration files`,builder:St,handler:async e=>{let{unapplied:t}=await gt(await ht(e));a(t.map(e=>({Name:e})),{quiet:e.quiet})}},wt={command:`migrations`,describe:`Create, list, and apply D1 database migrations`,builder:e=>e.command(c(vt,{command:`d1 migrations apply`,classification:{safeFlags:[]}})).command(c(bt,{command:`d1 migrations create`,classification:{safeFlags:[]}})).command(c(Ct,{command:`d1 migrations list`,classification:{safeFlags:[]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Tt(e){return e.usage(`$0 d1 create
19
-
20
- 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`]}).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`]}).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`]}).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 Et={command:`create`,describe:`Create D1 Database`,builder:Tt,handler:async t=>l({command:`d1 create`,classification:{safeFlags:[`jurisdiction`,`primary-location-hint`,`read-replication-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf d1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`),name:p(t.name,`name`,`text`),primary_location_hint:p(t[`primary-location-hint`],`primary-location-hint`,`text`),read_replication:{mode:p(t[`read-replication-mode`],`read-replication-mode`,`text`)}}):u(t.body)});return}let c=await i(t),l=t.local?e:await r();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Creating`,async()=>c.d1.create({...e,account_id:l})),{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`D1 database name.`));let d=f({jurisdiction:p(t.jurisdiction,`jurisdiction`,`text`),name:p(t.name,`name`,`text`),primary_location_hint:p(t[`primary-location-hint`],`primary-location-hint`,`text`),read_replication:{mode:p(t[`read-replication-mode`],`read-replication-mode`,`text`)}});a(await s(`Creating`,async()=>c.d1.create({...d,account_id:l})),{successLabel:`Created`})})};function Dt(e){return e.usage(`$0 d1 delete <database-id>
21
-
22
- 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 Ot={command:`delete <database-id>`,describe:`Delete D1 Database`,builder:Dt,handler:async t=>l({command:`d1 delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf d1 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}`,pathParams:{"database-id":String(t[`database-id`]??``)},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await r();if(t.accountId=l,!await h({force:!!t.force,message:`This permanently deletes the D1 database and all of its data.`})){process.stderr.write(`Aborted.
23
- `);return}a(await s(`Deleting`,async()=>c.d1.delete({account_id:l,database_id:t[`database-id`]})),{successLabel:`Deleted`})})};function kt(e){return e.usage(`$0 d1 edit <database-id>
24
-
25
- 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`]}).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 At={command:`edit <database-id>`,describe:`Update D1 Database partially`,builder:kt,handler:async t=>l({command:`d1 edit`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf d1 edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}`,pathParams:{"database-id":String(t[`database-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({read_replication:{mode:p(t[`read-replication-mode`],`read-replication-mode`,`text`)}}):u(t.body)});return}let c=await i(t),l=t.local?e:await r();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Updating`,async()=>c.d1.edit({...e,account_id:l,database_id:t[`database-id`]})),{successLabel:`Updated`});return}let d=f({read_replication:{mode:p(t[`read-replication-mode`],`read-replication-mode`,`text`)}});a(await s(`Updating`,async()=>c.d1.edit({...d,account_id:l,database_id:t[`database-id`]})),{successLabel:`Updated`})})};function jt(e){return e.usage(`$0 d1 get <database-id>
26
-
27
- 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,
28
- all fields are returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`get <database-id>`,describe:`Get D1 Database`,builder:te(jt),handler:async t=>l({command:`d1 get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={fields:t.fields};if(t.dryRun){o({command:`cf d1 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}`,pathParams:{"database-id":String(t[`database-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await r();t.accountId=u,a(await s(`Loading`,async()=>l.d1.get({account_id:u,database_id:t[`database-id`],...c})),{successLabel:`Loaded`})})};function Nt(e){return e.usage(`$0 d1 list
29
-
30
- 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 Pt={command:`list`,describe:`List D1 Databases`,builder:Nt,handler:async t=>l({command:`d1 list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={name:t.name,page:t.page,per_page:t[`per-page`]};if(t.dryRun){o({command:`cf d1 list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await r();t.accountId=u,a(await s(`Loading`,async()=>l.d1.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Ft(e){return e.usage(`$0 d1 query <database-id>
31
-
32
- 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 It={command:`query <database-id>`,describe:`Query D1 Database`,builder:Ft,handler:async t=>l({command:`d1 query`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf d1 query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}/query`,pathParams:{"database-id":String(t[`database-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({params:t.params,sql:p(t.sql,`sql`,`text`),batch:d(t.batch,`batch`)}):u(t.body)});return}let c=await i(t),l=t.local?e:await r();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Loading`,async()=>c.d1.query({body:e,account_id:l,database_id:t[`database-id`]})),{successLabel:`Loaded`});return}let m=f({params:t.params,sql:p(t.sql,`sql`,`text`),batch:d(t.batch,`batch`)});a(await s(`Loading`,async()=>c.d1.query({body:m,account_id:l,database_id:t[`database-id`]})),{successLabel:`Loaded`})})};function Lt(e){return e.usage(`$0 d1 raw <database-id>
33
-
34
- 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 Rt={command:`raw <database-id>`,describe:`Raw D1 Database query`,builder:Lt,handler:async t=>l({command:`d1 raw`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf d1 raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}/raw`,pathParams:{"database-id":String(t[`database-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({params:t.params,sql:p(t.sql,`sql`,`text`),batch:d(t.batch,`batch`)}):u(t.body)});return}let c=await i(t),l=t.local?e:await r();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Loading`,async()=>c.d1.raw({body:e,account_id:l,database_id:t[`database-id`]})),{successLabel:`Loaded`});return}let m=f({params:t.params,sql:p(t.sql,`sql`,`text`),batch:d(t.batch,`batch`)});a(await s(`Loading`,async()=>c.d1.raw({body:m,account_id:l,database_id:t[`database-id`]})),{successLabel:`Loaded`})})};function zt(e){return e.usage(`$0 d1 time-travel get-bookmark <database-id>
35
-
36
- 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 Bt={command:`get-bookmark <database-id>`,describe:`Get D1 database bookmark`,builder:zt,handler:async t=>l({command:`d1 time-travel get-bookmark`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={timestamp:t.timestamp};if(t.dryRun){o({command:`cf d1 time-travel get-bookmark`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}/time_travel/bookmark`,pathParams:{"database-id":String(t[`database-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await r();t.accountId=u,a(await s(`Loading`,async()=>l.d1.timeTravel.getBookmark({account_id:u,database_id:t[`database-id`],...c})),{successLabel:`Loaded`})})};function Vt(e){return e.usage(`$0 d1 time-travel restore <database-id>
37
-
38
- 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 Ht={command:`restore <database-id>`,describe:`Restore D1 Database to a bookmark or point in time`,builder:Vt,handler:async t=>l({command:`d1 time-travel restore`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{let c={bookmark:t.bookmark,timestamp:t.timestamp};if(t.dryRun){o({command:`cf d1 time-travel restore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}/time_travel/restore`,pathParams:{"database-id":String(t[`database-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await r();if(t.accountId=u,!await h({force:!!t.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.
39
- `);return}a(await s(`Deleting`,async()=>l.d1.timeTravel.restore({account_id:u,database_id:t[`database-id`],...c})),{successLabel:`Deleted`})})},Ut={command:`time-travel`,describe:`use specific point-in-time backups of your D1 database`,builder:e=>e.command(Bt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wt(e){return e.usage(`$0 d1 update <database-id>
40
-
41
- 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`]}).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 Gt={command:`update <database-id>`,describe:`Update D1 Database`,builder:Wt,handler:async t=>l({command:`d1 update`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf d1 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/d1/database/${t[`database-id`]==null?`<database-id>`:encodeURIComponent(String(t[`database-id`]))}`,pathParams:{"database-id":String(t[`database-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({read_replication:{mode:p(t[`read-replication-mode`],`read-replication-mode`,`text`)}}):u(t.body)});return}let c=await i(t),l=t.local?e:await r();if(t.accountId=l,t.body){let e=u(t.body);a(await s(`Updating`,async()=>c.d1.update({...e,account_id:l,database_id:t[`database-id`]})),{successLabel:`Updated`});return}t[`read-replication-mode`]===void 0&&(t[`read-replication-mode`]=await ee(`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 d=f({read_replication:{mode:p(t[`read-replication-mode`],`read-replication-mode`,`text`)}});a(await s(`Updating`,async()=>c.d1.update({...d,account_id:l,database_id:t[`database-id`]})),{successLabel:`Updated`})})},Kt={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(Et).command(Ot).command(At).command(Mt).command(Pt).command(It).command(Rt).command(Gt).command(wt).command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Kt as default};
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-CGUzvBgY.mjs";function m(e){return e.usage(`$0 diagnostics endpoint-healthchecks create
3
-
4
- Create Endpoint Health Check.`).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`],default:`icmp`}).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Endpoint Health Check`,builder:m,handler:async p=>s({command:`diagnostics endpoint-healthchecks create`,classification:{safeFlags:[`check-type`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf diagnostics endpoint-healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({check_type:u(p[`check-type`],`check-type`,`text`),endpoint:u(p.endpoint,`endpoint`,`text`),name:u(p.name,`name`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.diagnostics.endpointHealthchecks.create({body:e,account_id:m})),{successLabel:`Created`});return}p[`check-type`]===void 0&&(p[`check-type`]=await f(`check-type`,`type of check to perform`,[`icmp`])),p.endpoint===void 0&&(p.endpoint=await d(`endpoint`,`the IP address of the host to perform checks against`));let h=l({check_type:u(p[`check-type`],`check-type`,`text`),endpoint:u(p.endpoint,`endpoint`,`text`),name:u(p.name,`name`,`text`)});i(await o(`Creating`,async()=>s.diagnostics.endpointHealthchecks.create({body:h,account_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 diagnostics endpoint-healthchecks delete <id>
5
-
6
- Delete Endpoint Health Check.`).positional(`id`,{type:`string`,description:`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 _={command:`delete <id>`,describe:`Delete Endpoint Health Check`,builder:g,handler:async c=>s({command:`diagnostics endpoint-healthchecks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf diagnostics endpoint-healthchecks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/diagnostics/endpoint-healthchecks/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force})){process.stderr.write(`Aborted.
7
- `);return}i(await o(`Deleting`,async()=>s.diagnostics.endpointHealthchecks.delete({account_id:l,id:c.id})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 diagnostics endpoint-healthchecks get <id>
8
-
9
- Get a single Endpoint Health Check.`).positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <id>`,describe:`Get Endpoint Health Check`,builder:v,handler:async c=>s({command:`diagnostics endpoint-healthchecks get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf diagnostics endpoint-healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/diagnostics/endpoint-healthchecks/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.diagnostics.endpointHealthchecks.get({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 diagnostics endpoint-healthchecks list
10
-
11
- List Endpoint Health Checks.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Endpoint Health Checks`,builder:b,handler:async c=>s({command:`diagnostics endpoint-healthchecks list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf diagnostics endpoint-healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.diagnostics.endpointHealthchecks.list({account_id:l})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 diagnostics endpoint-healthchecks update <id>
12
-
13
- Update a Endpoint Health Check.`).positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`]}).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <id>`,describe:`Update Endpoint Health Check`,builder:S,handler:async p=>s({command:`diagnostics endpoint-healthchecks update`,classification:{safeFlags:[`check-type`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf diagnostics endpoint-healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/diagnostics/endpoint-healthchecks/${p.id==null?`<id>`:encodeURIComponent(String(p.id))}`,pathParams:{id:String(p.id??``)},bodyKind:`json`,body:p.body===void 0?l({check_type:u(p[`check-type`],`check-type`,`text`),endpoint:u(p.endpoint,`endpoint`,`text`),name:u(p.name,`name`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Updating`,async()=>s.diagnostics.endpointHealthchecks.update({body:e,account_id:m,id:p.id})),{successLabel:`Updated`});return}p[`check-type`]===void 0&&(p[`check-type`]=await f(`check-type`,`type of check to perform`,[`icmp`])),p.endpoint===void 0&&(p.endpoint=await d(`endpoint`,`the IP address of the host to perform checks against`));let h=l({check_type:u(p[`check-type`],`check-type`,`text`),endpoint:u(p.endpoint,`endpoint`,`text`),name:u(p.name,`name`,`text`)});i(await o(`Updating`,async()=>s.diagnostics.endpointHealthchecks.update({body:h,account_id:m,id:p.id})),{successLabel:`Updated`})})},w={command:`endpoint-healthchecks`,describe:`Monitor external endpoint availability with periodic HTTP/HTTPS health checks`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 diagnostics traceroutes create
14
-
15
- Run traceroutes from Cloudflare colos.`).option(`colos`,{type:`string`,array:!0,description:`If no source colo names specified, all colos will be used. China colos are unavailable for traceroutes.`}).option(`options-max-ttl`,{type:`number`,description:`Max TTL.`}).option(`options-packet-type`,{type:`string`,description:`Type of packet sent.`,choices:[`icmp`,`tcp`,`udp`,`gre`,`gre+icmp`]}).option(`options-packets-per-ttl`,{type:`number`,description:`Number of packets sent at each TTL.`}).option(`options-port`,{type:`number`,description:`For UDP and TCP, specifies the destination port. For ICMP, specifies the initial ICMP sequence value. Default value 0 will choose the best value to use for each protocol.`}).option(`options-wait-time`,{type:`number`,description:`Set the time (in seconds) to wait for a response to a probe.`}).option(`targets`,{type:`string`,array:!0,description:`The targets field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`create`,describe:`Traceroute`,builder:T,handler:async d=>s({command:`diagnostics traceroutes create`,classification:{safeFlags:[`options-packet-type`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf diagnostics traceroutes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/diagnostics/traceroute`,pathParams:{},bodyKind:`json`,body:d.body===void 0?l({colos:d.colos,options:{max_ttl:d[`options-max-ttl`],packet_type:u(d[`options-packet-type`],`options-packet-type`,`text`),packets_per_ttl:d[`options-packets-per-ttl`],port:d[`options-port`],wait_time:d[`options-wait-time`]},targets:d.targets}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.diagnostics.traceroutes.create({...e,account_id:f})),{successLabel:`Created`});return}if(d.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let p=l({colos:d.colos,options:{max_ttl:d[`options-max-ttl`],packet_type:u(d[`options-packet-type`],`options-packet-type`,`text`),packets_per_ttl:d[`options-packets-per-ttl`],port:d[`options-port`],wait_time:d[`options-wait-time`]},targets:d.targets});i(await o(`Creating`,async()=>s.diagnostics.traceroutes.create({...p,account_id:f})),{successLabel:`Created`})})},D={command:`traceroutes`,describe:`Run traceroutes from Cloudflare data centers to diagnose network path issues`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`diagnostics`,describe:`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,builder:e=>e.command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{O as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{existsSync as e,readFileSync as t}from"node:fs";import{join as n}from"node:path";import{homedir as r}from"node:os";import{execFileSync as i}from"node:child_process";function a(t){return r=>{if(!r.pkgRoot)return null;let i=n(r.pkgRoot,`bin`,t);return e(i)?i:null}}function o(){let t=n(process.env.CARGO_HOME??n(r(),`.cargo`),`bin`,`cloudflare-rs-dev-server`);return e(t)?t:null}const s=[{ecosystem:`npm`,pkg:`@cloudflare/vite-plugin`,versionConstraint:{range:`>=2.0.0-0 <3.0.0-0`,display:`@cloudflare/vite-plugin v2 beta`},description:`Vite-based dev server (recommended for JavaScript/TypeScript)`,manifest:`package.json`,binary:a(`cf-vite`),installHint:`npm install --save-dev @cloudflare/vite-plugin@beta`},{ecosystem:`npm`,pkg:`wrangler`,fallback:!0,versionConstraint:{range:`>=4.136.0`,display:`wrangler@4.136.0 or newer`},description:`Wrangler-based dev server (legacy Worker projects)`,manifest:`package.json`,binary:a(`cf-wrangler.js`),installHint:`npm install --save-dev wrangler@latest`},{ecosystem:`pypi`,pkg:`cloudflare-py-dev-server`,description:`Python dev server (Pyodide via workerd)`,manifest:`pyproject.toml`,binary:()=>null,installHint:`pip install cloudflare-py-dev-server (or: uv add --dev cloudflare-py-dev-server)`},{ecosystem:`cargo`,pkg:`cloudflare-rs-dev-server`,description:`Rust dev server (wasm-bindgen + workerd)`,manifest:`Cargo.toml`,binary:o,installHint:`cargo install cloudflare-rs-dev-server`}];function c(e){return s.find(t=>t.pkg===e)}function l(e){let t=[];t.push(...u(e)),t.push(...m(e)),t.push(...v(e));let n=t.filter(e=>!e.impl.fallback);return n.length>0?n:t}function u(r){let i=n(r,`package.json`);if(!e(i))return[];let a;try{let e=t(i,`utf-8`);a=JSON.parse(e)}catch{return[]}let o=d(a),s=[];for(let e of o){let t=c(e);if(!t||t.ecosystem!==`npm`)continue;let n=f(r,e),a=n?t.binary({cwd:r,pkgRoot:n}):null,o=n?p(n):void 0;s.push({impl:t,binary:a,installed:!!n,installedVersion:o,manifestPath:i})}return s}function d(e){let t=new Set;for(let n of[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`]){let r=e[n];if(r&&typeof r==`object`)for(let e of Object.keys(r))t.add(e)}return t}function f(t,r){if(e(n(t,`node_modules`,r,`package.json`)))return n(t,`node_modules`,r)}function p(e){try{let r=JSON.parse(t(n(e,`package.json`),`utf8`));return typeof r.version==`string`?r.version:void 0}catch{return}}function m(r){let i=n(r,`pyproject.toml`);if(!e(i))return[];let a;try{a=t(i,`utf-8`)}catch{return[]}let o=[];for(let e of h()){if(!g(a,e.pkg))continue;let t=_(r,e.pkg);o.push({impl:e,binary:t,manifestPath:i})}return o}function h(){let e=[],t=new Set;for(let n of b())n.ecosystem===`pypi`&&!t.has(n.pkg)&&(e.push(n),t.add(n.pkg));return e}function g(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`["']${n}(?=[\\s\\[<>=!~"';])`,`m`).test(e)}function _(t,r){if(e(n(t,`uv.lock`)))return`uv:${r}`;try{let n=i(`python3`,[`-c`,`import shutil, sys; p = shutil.which(${JSON.stringify(r)}); sys.stdout.write(p or "")`],{cwd:t,stdio:[`ignore`,`pipe`,`ignore`],encoding:`utf-8`}).trim();if(n&&e(n))return n}catch{}return null}function v(r){let i=n(r,`Cargo.toml`);if(!e(i))return[];let a;try{a=t(i,`utf-8`)}catch{return[]}let o=[];for(let e of b()){if(e.ecosystem!==`cargo`||!y(a,e.pkg))continue;let t=e.binary({cwd:r});o.push({impl:e,binary:t,manifestPath:i})}return o}function y(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^\\s*${n}\\s*=)|(^\\s*\\[[^\\]]*\\.${n}\\s*\\])`,`m`).test(e)}function b(){return s}export{s as n,l as t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./discover-C5aiI6u0.mjs";export{e as discoverImpls};