cf 1.0.0-beta.11 → 1.0.0-beta.13

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 (448) hide show
  1. package/bin/cf +1 -1
  2. package/dist/_meta/commands.json +3119 -2067
  3. package/dist/_meta/hand-written-commands.json +14 -1
  4. package/dist/_meta/schemas.json +1856 -1132
  5. package/dist/abuse-reports-BjU1s8cf.mjs +24 -0
  6. package/dist/{access-DuHs0Mii.mjs → access-C_G2MZnA.mjs} +1 -1
  7. package/dist/account-tags-CaXDDeZ4.mjs +15 -0
  8. package/dist/accounts-BALwxDQY.mjs +131 -0
  9. package/dist/{acm-BgSr3Ig4.mjs → acm-CP9EaXQN.mjs} +7 -7
  10. package/dist/addressing-DRlaxqrI.mjs +93 -0
  11. package/dist/agent-context-DFEgYjEQ.mjs +2 -0
  12. package/dist/agent-memory-vGhlfZBx.mjs +34 -0
  13. package/dist/ai-CJtbWfB9.mjs +31 -0
  14. package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-C0BJNqZZ.mjs} +3 -3
  15. package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
  16. package/dist/ai-search-DGU1Y5By.mjs +79 -0
  17. package/dist/ai-security-CFTaYk_X.mjs +10 -0
  18. package/dist/alerting-1hun27JC.mjs +56 -0
  19. package/dist/analytics-DXUSjvzT.mjs +17 -0
  20. package/dist/analytics_engine-CQsnL09C.mjs +4 -0
  21. package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
  22. package/dist/{api-security-gB1FHrHq.mjs → api-security-BXhrfR6-.mjs} +57 -57
  23. package/dist/argo-LPUCTnee.mjs +14 -0
  24. package/dist/artifacts-Dt6easua.mjs +43 -0
  25. package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-CVznAM2Z.mjs} +2 -2
  26. package/dist/auth-CGLsxbc6.mjs +2 -0
  27. package/dist/auth-CrmVwfpJ.mjs +2 -0
  28. package/dist/{auth-7Fk7PVIC.mjs → auth-eQr-kQCH.mjs} +1 -1
  29. package/dist/{auth-token-DeG33BMQ.mjs → auth-token-pNQrX_9O.mjs} +1 -1
  30. package/dist/autoconfig-sD7Frryg.mjs +532 -0
  31. package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
  32. package/dist/basin-catalog-ZQICw-zF.mjs +46 -0
  33. package/dist/billing-Dy1-dV_B.mjs +23 -0
  34. package/dist/bot-management-DTgPwL7O.mjs +9 -0
  35. package/dist/botnet-feed-xb98Cj3Y.mjs +11 -0
  36. package/dist/brand-protection-Ck3okE2k.mjs +27 -0
  37. package/dist/browser-run-DJGJSzFX.mjs +42 -0
  38. package/dist/build-B1L6xrgC.mjs +2 -0
  39. package/dist/build-HmSXqjGn.mjs +2 -0
  40. package/dist/builds-CYxcZtkG.mjs +71 -0
  41. package/dist/cache-D9tSfovH.mjs +45 -0
  42. package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-CpiveTFC.mjs} +3 -3
  43. package/dist/cf-BxsXrVeh.mjs +18 -0
  44. package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
  45. package/dist/chunk-NDZDTP46-Bjx_wtJe.mjs +361 -0
  46. package/dist/chunk-TAK63GWY-DdMktrgc.mjs +319 -0
  47. package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
  48. package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
  49. package/dist/{cli-aChy8ou_.mjs → cli-DeJc9U8z.mjs} +1 -1
  50. package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
  51. package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-CF6YZyvP.mjs} +6 -6
  52. package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-BLoe9kS5.mjs} +14 -14
  53. package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-DXRUHsjt.mjs} +3 -3
  54. package/dist/cloudflared--1Ws1RJy.mjs +2 -0
  55. package/dist/cloudforce-one-CBLxXi6v.mjs +447 -0
  56. package/dist/{command-07vhr56i.mjs → command-83uVfXh9.mjs} +1 -1
  57. package/dist/{command-Cdx___59.mjs → command-BDe67N_n.mjs} +1 -1
  58. package/dist/command-BlIb6RR2.mjs +2 -0
  59. package/dist/{command-dAYWrB5y.mjs → command-Bpzp8Mz2.mjs} +1 -1
  60. package/dist/{command-eM48o0J6.mjs → command-BvfKhMl7.mjs} +1 -1
  61. package/dist/command-CG6RvZs0.mjs +2 -0
  62. package/dist/{command-D0MKPucK.mjs → command-CcuLC6CJ.mjs} +1 -1
  63. package/dist/{command-Ds5OVat3.mjs → command-Cu7dcaHT.mjs} +1 -1
  64. package/dist/{command-BsmF3J_l.mjs → command-D3fyhdy-.mjs} +1 -1
  65. package/dist/{command-Dv6YavZa.mjs → command-DUhX8Dcr.mjs} +1 -1
  66. package/dist/{command-maDJWJgu.mjs → command-Dh7RmjFu.mjs} +1 -1
  67. package/dist/{command-C2pNxAeL.mjs → command-DwXiDOeH.mjs} +1 -1
  68. package/dist/{command-CrtDkZNs.mjs → command-UiHLJ8Ji.mjs} +1 -1
  69. package/dist/command-_rqD0hXF.mjs +2 -0
  70. package/dist/{command-B6TpINoN.mjs → command-oNVwyjGB.mjs} +1 -1
  71. package/dist/{completions-D0280hul.mjs → completions-D06AO7A8.mjs} +12 -12
  72. package/dist/connector-interrupts-DelTmNyw.mjs +6 -0
  73. package/dist/connector-telemetry-events-BwxR3G8d.mjs +6 -0
  74. package/dist/connector-telemetry-snapshots-Bqq-hrpJ.mjs +6 -0
  75. package/dist/connectors-D-m3rEpk.mjs +15 -0
  76. package/dist/containers-CVNfEjJs.mjs +78 -0
  77. package/dist/containers-DeoZyeQe.mjs +375 -0
  78. package/dist/{content-scan-BCtWBCqd.mjs → content-scan-W0BNzbQp.mjs} +7 -7
  79. package/dist/{context-CquYYyS3.mjs → context-q7UaYK69.mjs} +2 -2
  80. package/dist/{cps-C8BbnbuD.mjs → cps-BZ6hqRb5.mjs} +3 -3
  81. package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-Bo1t3CLh.mjs} +3 -3
  82. package/dist/ct-alerting-E03faC7p.mjs +5 -0
  83. package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-CUySSPzi.mjs} +7 -7
  84. package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-gNpWkJPQ.mjs} +5 -5
  85. package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-abGBAbx7.mjs} +12 -12
  86. package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-BgNXol1P.mjs} +5 -5
  87. package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-DMKX3aoD.mjs} +10 -10
  88. package/dist/d1-CE08YqYk.mjs +93 -0
  89. package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-B5YUEWu0.mjs} +2 -2
  90. package/dist/delegate.mjs +1 -1
  91. package/dist/deploy-CWNm1-5v.mjs +2 -0
  92. package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
  93. package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
  94. package/dist/{dev-BHkVwAea.mjs → dev-ZA8itQE7.mjs} +2 -2
  95. package/dist/diagnostics-UMbG6m4n.mjs +15 -0
  96. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  97. package/dist/discover-DIDEGKo3.mjs +2 -0
  98. package/dist/discover-P20XeGBF.mjs +2 -0
  99. package/dist/dist-BHEmAAHr.mjs +487 -0
  100. package/dist/dist-uRuGmkMB.mjs +60 -0
  101. package/dist/dls-DIl16mLp.mjs +17 -0
  102. package/dist/{dns-BLNa0GrP.mjs → dns-QUpgljRG.mjs} +63 -63
  103. package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-BZwJXHLj.mjs} +9 -9
  104. package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
  105. package/dist/dotenv-DpXaxfho.mjs +4 -0
  106. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  107. package/dist/durable-objects-BCj4ykpU.mjs +6 -0
  108. package/dist/{email-auth-C28s03aI.mjs → email-auth-DlHIYhCk.mjs} +3 -3
  109. package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-UKVS4DYy.mjs} +22 -22
  110. package/dist/email-security-CZjfRIg0.mjs +158 -0
  111. package/dist/{email-sending-kTVAlVKO.mjs → email-sending-Dquc880C.mjs} +22 -22
  112. package/dist/error-sanitization-DE_zSrXw.mjs +2 -0
  113. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  114. package/dist/fieldExtractors-BbwDRquU.mjs +9 -0
  115. package/dist/{firewall-BND3qSY2.mjs → firewall--mTfDnCJ.mjs} +17 -17
  116. package/dist/flagship-cfoSwwM9.mjs +28 -0
  117. package/dist/{fraud-DgyYv_CC.mjs → fraud-Dcsq3EYK.mjs} +3 -3
  118. package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
  119. package/dist/generate-D80-1GnZ.mjs +2 -0
  120. package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-DPKSkZQi.mjs} +3 -3
  121. package/dist/gt-3bcLGJ7V.mjs +3 -0
  122. package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-D78hIIBC.mjs} +10 -10
  123. package/dist/{hostnames-3CqeMF5g.mjs → hostnames-sF999-6H.mjs} +5 -5
  124. package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-qWACKfA4.mjs} +10 -10
  125. package/dist/iam-Bvg_PayW.mjs +52 -0
  126. package/dist/images-DI_lEZ4L.mjs +71 -0
  127. package/dist/index.mjs +1 -1
  128. package/dist/init-1w_mcgk3.mjs +43 -0
  129. package/dist/intel-BxElBUMP.mjs +76 -0
  130. package/dist/interactive-BW9T1D1q.mjs +48 -0
  131. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  132. package/dist/{ips-WWvPwSBc.mjs → ips-DWoaKxi7.mjs} +2 -2
  133. package/dist/k2-tFjaftl-.mjs +11 -0
  134. package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-BrvxHU4J.mjs} +6 -6
  135. package/dist/keys-DcwTYKRf.mjs +4 -0
  136. package/dist/kv-htXS-7uP.mjs +15 -0
  137. package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-BDiIwpss.mjs} +1 -1
  138. package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +8 -8
  139. package/dist/lifecycle-oud60haK.mjs +2 -0
  140. package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-BNTUt4yG.mjs} +40 -40
  141. package/dist/local-DlDumOSC.mjs +2 -0
  142. package/dist/{local-rYpzEQb-.mjs → local-DlT72Xpn.mjs} +1 -1
  143. package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-CokO6qaX.mjs} +1 -1
  144. package/dist/{login-bnylLTit.mjs → login-BGF_I_LT.mjs} +1 -1
  145. package/dist/login-Ccw-mYwT.mjs +2 -0
  146. package/dist/logo-matches-tE8LTKgg.mjs +6 -0
  147. package/dist/logos-Bj845Mcw.mjs +7 -0
  148. package/dist/logpush-Cs8JdvKi.mjs +46 -0
  149. package/dist/{logs-c3b3USyS.mjs → logs-C92XZvNu.mjs} +11 -11
  150. package/dist/magic-cloud-networking-hNp5MMw-.mjs +71 -0
  151. package/dist/magic-network-monitoring-68GuWAnv.mjs +36 -0
  152. package/dist/magic-transit-DNd7gu4j.mjs +383 -0
  153. package/dist/managed-defense-B_wCAuFD.mjs +18 -0
  154. package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-DZdxHPOh.mjs} +4 -4
  155. package/dist/{matches-hnU16rSJ.mjs → matches-B65CkflD.mjs} +3 -3
  156. package/dist/mcp-DrJW5ayK.mjs +32 -0
  157. package/dist/mesh-DfVzYTn1.mjs +26 -0
  158. package/dist/metadata-Df5kCWJv.mjs +2 -0
  159. package/dist/{migrate-BNvUWrjy.mjs → migrate-CZNq63Uj.mjs} +1 -1
  160. package/dist/{monetization-Dsqj9DCA.mjs → monetization-BGaI8CMO.mjs} +9 -9
  161. package/dist/mtls-certificates-BsU2emDD.mjs +13 -0
  162. package/dist/network-BEMD8P0U.mjs +50 -0
  163. package/dist/network-interconnects-DMu_fcbo.mjs +68 -0
  164. package/dist/o11y-C1a4gDGF.mjs +93 -0
  165. package/dist/{oauth-CeZ3d_dB.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
  166. package/dist/oauth-clients-p4Etdqy_.mjs +16 -0
  167. package/dist/{oauth-w0fWmrwU.mjs → oauth-mspHHU5U.mjs} +1 -1
  168. package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-B2IabFza.mjs} +2 -2
  169. package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
  170. package/dist/{organization-DNieJ1xJ.mjs → organization-CdXt7AVZ.mjs} +16 -16
  171. package/dist/{organizations-BIXPmTy5.mjs → organizations-5S6xEp7T.mjs} +2 -2
  172. package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-_VJAoK1D.mjs} +5 -5
  173. package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +3 -3
  174. package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-DZHld9fA.mjs} +14 -14
  175. package/dist/output-BOe-3AQG.mjs +2 -0
  176. package/dist/{page-rules-DA552Ra4.mjs → page-rules-o1tAMMsD.mjs} +7 -7
  177. package/dist/pages-CmiOhjSl.mjs +54 -0
  178. package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
  179. package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
  180. package/dist/pipelines-DWLQC0F6.mjs +44 -0
  181. package/dist/precursor-B6DjBib6.mjs +4 -0
  182. package/dist/previews-dUKEBGSM.mjs +4 -0
  183. package/dist/process-2wmDCy17.mjs +2 -0
  184. package/dist/{progress-TLUEIYE6.mjs → progress-BtkTVcHI.mjs} +1 -1
  185. package/dist/prompt-RlgRrmbm.mjs +3 -0
  186. package/dist/queries-yLwoJRHV.mjs +9 -0
  187. package/dist/queues-CnJRaE1o.mjs +57 -0
  188. package/dist/r2-CuC6-zQX.mjs +128 -0
  189. package/dist/{radar-Bez6k9Dw.mjs → radar-DrQLcbkq.mjs} +150 -150
  190. package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
  191. package/dist/realtime-CjsnzHxD.mjs +172 -0
  192. package/dist/registrar-BgOsxTnX.mjs +43 -0
  193. package/dist/registrar-sandbox-3ikBD9fB.mjs +56 -0
  194. package/dist/{registry-CsSLAAOE.mjs → registry-CHowrQsZ.mjs} +1 -1
  195. package/dist/reporting-hE127s5r.mjs +14 -0
  196. package/dist/request-headers-DiJeDAn1.mjs +2 -0
  197. package/dist/request-tracers-BCwLxmPN.mjs +4 -0
  198. package/dist/resolve-CaTBV-c6.mjs +2 -0
  199. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  200. package/dist/resource-sharing-2qvWUuMa.mjs +40 -0
  201. package/dist/resource-tagging-Dwx7iL3v.mjs +4 -0
  202. package/dist/rules-DxVQ6jIg.mjs +18 -0
  203. package/dist/rulesets-Cdh8YjI9.mjs +37 -0
  204. package/dist/rum-a4CMq4Qu.mjs +30 -0
  205. package/dist/run-BvHwWWUX.mjs +2 -0
  206. package/dist/run-CkbrPJPx.mjs +2 -0
  207. package/dist/schema-elj12WOx.mjs +2 -0
  208. package/dist/schema-flags-BzoBGPWk.mjs +5 -0
  209. package/dist/scim-B8XlXl8v.mjs +18 -0
  210. package/dist/secrets-store-Cqhedh_i.mjs +24 -0
  211. package/dist/{security-insights-DVAqroY5.mjs → security-insights-le2-DteL.mjs} +20 -20
  212. package/dist/{security-txt-rfrrdiZV.mjs → security-txt-cCArWXur.mjs} +4 -4
  213. package/dist/{session-B6mFkaVZ.mjs → session-C1BhT1ZJ.mjs} +1 -1
  214. package/dist/shared-BPjcpXuA.mjs +2 -0
  215. package/dist/{smart-shield-_HA814Im.mjs → smart-shield-Csyh8hwB.mjs} +11 -11
  216. package/dist/{snippets-mRelEw0p.mjs → snippets-DUWx25q6.mjs} +8 -8
  217. package/dist/source-mXUcrTVw.mjs +6 -0
  218. package/dist/spawn-IysxuTNW.mjs +10 -0
  219. package/dist/{spectrum-BwtOiaDw.mjs → spectrum-Da3UYSOR.mjs} +11 -11
  220. package/dist/{speed-DmqsZtiJ.mjs → speed-NxlMnB2e.mjs} +11 -11
  221. package/dist/sql-CNdHAlQ8.mjs +4 -0
  222. package/dist/src-JfLDUxFr.mjs +125 -0
  223. package/dist/{ssl-DCvfveJB.mjs → ssl-BtaX2WEJ.mjs} +16 -16
  224. package/dist/startup-profile-B2l0ChVu.mjs +2 -0
  225. package/dist/startup-profile-CdJWgNjd.mjs +29 -0
  226. package/dist/{state-BPwdiNO_.mjs → state-BDSvdSdP.mjs} +1 -1
  227. package/dist/state-JB4_BU1o.mjs +2 -0
  228. package/dist/stream-C1Ijjzn4.mjs +102 -0
  229. package/dist/submit-MdkuU_Pt.mjs +4 -0
  230. package/dist/{tags-Djw0e-4j.mjs → tags-CA1xMM96.mjs} +2 -2
  231. package/dist/telemetry-BsYO3nxG.mjs +2 -0
  232. package/dist/{telemetry-DrFNujdx.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
  233. package/dist/{tenant-tc1wb_ym.mjs → tenant-BB6Oszcl.mjs} +5 -5
  234. package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +4 -4
  235. package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
  236. package/dist/{tools-CB4NleeJ.mjs → tools-CSc5DmFi.mjs} +1 -1
  237. package/dist/tunnels-CRFtyHWz.mjs +29 -0
  238. package/dist/turnstile-DBXWo_Xe.mjs +33 -0
  239. package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
  240. package/dist/update-check-C2oVEbXx.mjs +2 -0
  241. package/dist/update-check-CMXSdres.mjs +2 -0
  242. package/dist/update-check-worker.mjs +1 -1
  243. package/dist/url-info-t-XAs0Mk.mjs +4 -0
  244. package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-Cs4F8e0a.mjs} +4 -4
  245. package/dist/url-scanner-CBIoDbTx.mjs +16 -0
  246. package/dist/{user-3uwLMH78.mjs → user-CevdOMoa.mjs} +52 -52
  247. package/dist/values-CjNlkbIh.mjs +4 -0
  248. package/dist/vectorize-9d9tPmg5.mjs +32 -0
  249. package/dist/version-BdVUXLnK.mjs +2 -0
  250. package/dist/waiting-rooms--5WmrWb3.mjs +53 -0
  251. package/dist/{web-assets-BfEprX1S.mjs → web-assets-BHot_MU8.mjs} +30 -30
  252. package/dist/{web3-DNbp5sZw.mjs → web3-CYfWAF6b.mjs} +13 -13
  253. package/dist/workers-S17M0n3h.mjs +40 -0
  254. package/dist/workers-builds-Dw7ho3So.mjs +14 -0
  255. package/dist/workers-for-platforms-A3yjyLh3.mjs +40 -0
  256. package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-BZ2xXtC3.mjs} +7 -7
  257. package/dist/workflows-BgGrVpSR.mjs +43 -0
  258. package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  259. package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BsD2dMI3.mjs} +11 -11
  260. package/dist/zero-trust-CA3iGQbG.mjs +837 -0
  261. package/dist/{zone-BVDW2UGd.mjs → zone-D2M4EZD0.mjs} +2 -2
  262. package/dist/{zones-CcZL0YQp.mjs → zones-BoOC_JzC.mjs} +43 -43
  263. package/package.json +33 -35
  264. package/dist/abuse-reports-DX5xgeka.mjs +0 -24
  265. package/dist/account-tags-CiKwgOWd.mjs +0 -15
  266. package/dist/accounts-DfXSHrkF.mjs +0 -138
  267. package/dist/addressing-B70NFnrX.mjs +0 -93
  268. package/dist/agent-context-GRiQ4zRU.mjs +0 -2
  269. package/dist/agent-memory-DJRquHeq.mjs +0 -34
  270. package/dist/ai-CP2oIS-I.mjs +0 -29
  271. package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
  272. package/dist/ai-search-C4YWVTCa.mjs +0 -79
  273. package/dist/ai-security-Bt_fG65f.mjs +0 -10
  274. package/dist/alerting-CRr88fVR.mjs +0 -56
  275. package/dist/analytics-XqS9OP5B.mjs +0 -20
  276. package/dist/analytics_engine-CzmYem4f.mjs +0 -4
  277. package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
  278. package/dist/argo-wFCAsYx7.mjs +0 -10
  279. package/dist/artifacts-qFjlNRqb.mjs +0 -43
  280. package/dist/auth-BmJ946bE.mjs +0 -2
  281. package/dist/auth-Br-t8vL_.mjs +0 -2
  282. package/dist/autoconfig-D-copdZG.mjs +0 -511
  283. package/dist/basin-catalog-CshcpsAH.mjs +0 -46
  284. package/dist/billing-B-xNxxiP.mjs +0 -23
  285. package/dist/bot-management-DhafeA2J.mjs +0 -9
  286. package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
  287. package/dist/brand-protection-c3WiHbYn.mjs +0 -27
  288. package/dist/browser-run-D9_cwaSD.mjs +0 -46
  289. package/dist/build-9ihDp-Gy.mjs +0 -2
  290. package/dist/build-DrG6TqMw.mjs +0 -2
  291. package/dist/builds-Dl8if-2k.mjs +0 -71
  292. package/dist/cache-CIZokBjd.mjs +0 -45
  293. package/dist/cf-DfQfIu3q.mjs +0 -18
  294. package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
  295. package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
  296. package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
  297. package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
  298. package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
  299. package/dist/cloudflared-CEfZhSQH.mjs +0 -2
  300. package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
  301. package/dist/command-BWC9CbE7.mjs +0 -2
  302. package/dist/command-C65Ed0o9.mjs +0 -2
  303. package/dist/command-DHdWKtqx.mjs +0 -2
  304. package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
  305. package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
  306. package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
  307. package/dist/connectors-DGtx-rPI.mjs +0 -15
  308. package/dist/containers-CzNbBrYE.mjs +0 -239
  309. package/dist/containers-DEFrbNgO.mjs +0 -78
  310. package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
  311. package/dist/d1-B2duXfH2.mjs +0 -41
  312. package/dist/deploy-BdWBEbLj.mjs +0 -2
  313. package/dist/deploy-input-LmLfj6kI.mjs +0 -2
  314. package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
  315. package/dist/dialog-Dpi-UVbz.mjs +0 -2
  316. package/dist/discover-BYkHr5Ja.mjs +0 -2
  317. package/dist/discover-t6E9lpf3.mjs +0 -2
  318. package/dist/dist-Cpb7_h4N.mjs +0 -57
  319. package/dist/dist-D1iG7guo.mjs +0 -366
  320. package/dist/dist-zep5OXGt.mjs +0 -48
  321. package/dist/dls-Caya7FZc.mjs +0 -17
  322. package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
  323. package/dist/dotenv-CcQjGlV0.mjs +0 -4
  324. package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
  325. package/dist/durable-objects-DuRbdp7N.mjs +0 -6
  326. package/dist/email-security-DPU6xvI9.mjs +0 -158
  327. package/dist/error-sanitization-BbEw--0B.mjs +0 -2
  328. package/dist/error-sanitization-p5rmb53x.mjs +0 -2
  329. package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
  330. package/dist/flagship-DfxbNzgx.mjs +0 -28
  331. package/dist/generate-9P8Q_RiO.mjs +0 -2
  332. package/dist/gt-KlYHH-UC.mjs +0 -2
  333. package/dist/iam-CV_M681j.mjs +0 -52
  334. package/dist/images-DaLPjskW.mjs +0 -71
  335. package/dist/init-CBKifk5L.mjs +0 -39
  336. package/dist/intel-MpftjuPB.mjs +0 -76
  337. package/dist/interactive-D80kbTap.mjs +0 -32
  338. package/dist/interactive-mJQ_IrGd.mjs +0 -2
  339. package/dist/k2-D0QYUFqT.mjs +0 -13
  340. package/dist/keys-DhX4AcqF.mjs +0 -4
  341. package/dist/kv-DLUfUL0_.mjs +0 -15
  342. package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
  343. package/dist/local-DkYQiSQQ.mjs +0 -2
  344. package/dist/login-CnE2Ii_F.mjs +0 -2
  345. package/dist/logo-matches-DFZybI0C.mjs +0 -6
  346. package/dist/logos-Da2YtqSN.mjs +0 -7
  347. package/dist/logpush-Q7WIEHS1.mjs +0 -46
  348. package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
  349. package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
  350. package/dist/magic-transit-4-THD45G.mjs +0 -383
  351. package/dist/managed-defense-CTMqSp6z.mjs +0 -18
  352. package/dist/mcp-kZX4irfN.mjs +0 -32
  353. package/dist/mesh-Dxzvvso6.mjs +0 -26
  354. package/dist/metadata-C33s4rc-.mjs +0 -2
  355. package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
  356. package/dist/network-interconnects-osO_vAPu.mjs +0 -73
  357. package/dist/network-mEnXTEiG.mjs +0 -50
  358. package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
  359. package/dist/observability-BxL2RqWZ.mjs +0 -80
  360. package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
  361. package/dist/output-ClYel9WX.mjs +0 -2
  362. package/dist/pages-B0x7tidm.mjs +0 -54
  363. package/dist/pay-per-crawl-DoTg9VP7.mjs +0 -65
  364. package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
  365. package/dist/pipelines-CQxrm9ao.mjs +0 -44
  366. package/dist/precursor-FiGYDRV9.mjs +0 -4
  367. package/dist/previews-BthBa50j.mjs +0 -4
  368. package/dist/prompt-Ck_1PCHm.mjs +0 -3
  369. package/dist/queries-C0RRdol7.mjs +0 -9
  370. package/dist/queues-sLgvjsRP.mjs +0 -57
  371. package/dist/r2-C2PllL6i.mjs +0 -125
  372. package/dist/realtime-D-HSXznX.mjs +0 -172
  373. package/dist/registrar-DwHrG9QR.mjs +0 -43
  374. package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
  375. package/dist/reporting-DolhAb10.mjs +0 -14
  376. package/dist/request-headers-Lhj314mk.mjs +0 -2
  377. package/dist/request-tracers-w72hKc33.mjs +0 -4
  378. package/dist/resolve-CGKqk7q8.mjs +0 -2
  379. package/dist/resolve-Djf2xgBx.mjs +0 -2
  380. package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
  381. package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
  382. package/dist/rules-C8a7cV-W.mjs +0 -18
  383. package/dist/rulesets-RJ6yBefy.mjs +0 -37
  384. package/dist/rum-Bk1dPW4p.mjs +0 -30
  385. package/dist/run-BJOAPmsz.mjs +0 -2
  386. package/dist/run-iFM5TxtQ.mjs +0 -2
  387. package/dist/schema-flags-PagOq-G2.mjs +0 -5
  388. package/dist/schema-v7mOxMdx.mjs +0 -2
  389. package/dist/scim-C0FmjkkV.mjs +0 -18
  390. package/dist/secrets-store-cG_5RMzK.mjs +0 -24
  391. package/dist/shared-BqsWoApw.mjs +0 -2
  392. package/dist/source-38bULAR8.mjs +0 -6
  393. package/dist/spawn-BzPhcLJI.mjs +0 -10
  394. package/dist/src--KDGqL5N.mjs +0 -109
  395. package/dist/startup-profile-BCe9k9sR.mjs +0 -17
  396. package/dist/startup-profile-WrwRyMwH.mjs +0 -2
  397. package/dist/state-a1tTOGjm.mjs +0 -2
  398. package/dist/stream-aroClJeD.mjs +0 -102
  399. package/dist/submit-BBKhoKT8.mjs +0 -4
  400. package/dist/telemetry-DoBQOGRk.mjs +0 -2
  401. package/dist/tunnels-C2FTswb6.mjs +0 -29
  402. package/dist/turnstile-BV4Mdd-j.mjs +0 -33
  403. package/dist/update-check-CFt6cMOi.mjs +0 -2
  404. package/dist/update-check-Dtj9fzNe.mjs +0 -2
  405. package/dist/url-info-CeegsDK7.mjs +0 -4
  406. package/dist/url-scanner-BFXMrpJF.mjs +0 -16
  407. package/dist/values-BTncDc3U.mjs +0 -4
  408. package/dist/vectorize-CtMAtx8r.mjs +0 -32
  409. package/dist/version-oN1bmOgM.mjs +0 -2
  410. package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
  411. package/dist/workers-DK_JgS4Y.mjs +0 -38
  412. package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
  413. package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
  414. package/dist/workflows-CA5K8FFb.mjs +0 -43
  415. package/dist/zero-trust-CQNohO7_.mjs +0 -821
  416. /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
  417. /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
  418. /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
  419. /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
  420. /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
  421. /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
  422. /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
  423. /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
  424. /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
  425. /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
  426. /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
  427. /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
  428. /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
  429. /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
  430. /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
  431. /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
  432. /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
  433. /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
  434. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
  435. /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
  436. /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
  437. /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
  438. /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
  439. /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
  440. /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
  441. /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
  442. /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
  443. /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
  444. /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
  445. /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
  446. /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
  447. /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
  448. /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,i as r,t as i}from"./context-CquYYyS3.mjs";import{t as a}from"./output-ClYel9WX.mjs";import{t as o}from"./dry-run-p9Q7nMZ5.mjs";import{t as s}from"./progress-TLUEIYE6.mjs";import{t as c}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as l,t as u}from"./body-parser-NjzJZMOV.mjs";import{n as d}from"./input-validation-0CeePPHp.mjs";import{a as f,i as p,n as m}from"./prompt-Ck_1PCHm.mjs";function h(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-RlgRrmbm.mjs";function h(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
3
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 n():void 0,t=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/${t}/${r}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(t),"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 t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();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>
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 n():void 0,t=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/${t}/${r}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(t),"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 t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{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`)}),_=await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{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
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 n():void 0,t=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/${t}/${r}/custom_pages/${m.identifier==null?`<identifier>`:encodeURIComponent(String(m.identifier))}`,pathParams:{"account-or-zone":String(t),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 t(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await r({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await i();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
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 n():void 0,t=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/${t}/${r}/custom_pages/${m.identifier==null?`<identifier>`:encodeURIComponent(String(m.identifier))}`,pathParams:{"account-or-zone":String(t),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 t(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await r({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await i();if(h===`zones`?m.zoneId=g:m.accountId=g,m.body){let e=l(m.body),t=await s(`Updating`,async()=>c.customPages.accountCustomPages.update({...e,account_or_zone:h,account_or_zone_id:g,identifier:m.identifier}));a(t,{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`)}),v=await s(`Updating`,async()=>c.customPages.accountCustomPages.update({..._,account_or_zone:h,account_or_zone_id:g,identifier:m.identifier}));a(v,{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
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 n():void 0,t=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/${t}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(t),"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 t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();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>
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 n():void 0,t=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/${t}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(t),"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 t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.customPages.assets.create.custom.asset({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{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`)}),_=await s(`Creating`,async()=>c.customPages.assets.create.custom.asset({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{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
9
 
10
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 n():void 0,t=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/${t}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();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>
11
+ `);return}let f=await s(`Deleting`,async()=>c.customPages.assets.delete.custom.asset({account_or_zone:u,account_or_zone_id:d,asset_name:l[`asset-name`]}));a(f,{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
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 n():void 0,t=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/${t}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();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
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 n():void 0,t=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/${t}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.customPages.assets.get.custom.asset({account_or_zone:u,account_or_zone_id:d,asset_name:l[`asset-name`]}));a(f,{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
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 n():void 0,t=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/${t}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();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>
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 n():void 0,t=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/${t}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.customPages.assets.list.custom.assets({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{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
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 n():void 0,t=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/${t}/${r}/custom_pages/assets/${p[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(p[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"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 t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();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>
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 n():void 0,t=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/${t}/${r}/custom_pages/assets/${p[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(p[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"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 t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=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`]}));a(t,{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`)}),_=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`]}));a(_,{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
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 n():void 0,t=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/${t}/${r}/custom_pages/${l.identifier==null?`<identifier>`:encodeURIComponent(String(l.identifier))}`,pathParams:{"account-or-zone":String(t),identifier:String(l.identifier??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();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
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 n():void 0,t=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/${t}/${r}/custom_pages/${l.identifier==null?`<identifier>`:encodeURIComponent(String(l.identifier))}`,pathParams:{"account-or-zone":String(t),identifier:String(l.identifier??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.customPages.get({account_or_zone:u,account_or_zone_id:d,identifier:l.identifier}));a(f,{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 custom-pages list
20
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 n():void 0,t=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/${t}/${r}/custom_pages`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();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};
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 n():void 0,t=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/${t}/${r}/custom_pages`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.customPages.list({account_or_zone:u,account_or_zone_id:d}));a(f,{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};
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{n}from"./resolve-CaTBV-c6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{n as c,t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g,t as _}from"./prompt-RlgRrmbm.mjs";import{t as ee}from"./cli-types-9oYmRTHJ.mjs";import v from"node:fs";import y from"node:path";function te(e){return e.usage(`$0 d1 create
3
+
4
+ Create a new D1 database in your account.`).option(`jurisdiction`,{type:`string`,description:`Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.`,choices:[`eu`,`fedramp`,`us`]}).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 ne={command:`create`,describe:`Create D1 Database`,builder:te,handler:async n=>l({command:`d1 create`,classification:{safeFlags:[`jurisdiction`,`primary-location-hint`,`read-replication-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){let e=await r();o({command:`cf d1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database`,pathParams:{},bodyKind:`json`,body:n.body===void 0?f({jurisdiction:p(n.jurisdiction,`jurisdiction`,`text`),name:p(n.name,`name`,`text`),primary_location_hint:p(n[`primary-location-hint`],`primary-location-hint`,`text`),read_replication:{mode:p(n[`read-replication-mode`],`read-replication-mode`,`text`)}}):u(n.body)});return}let c=await t(n),l=n.local?e:await i();if(n.accountId=l,n.body){let e=u(n.body),t=await s(`Creating`,async()=>c.d1.create({...e,account_id:l}));a(t,{successLabel:`Created`});return}n.name===void 0&&(n.name=await m(`name`,`D1 database name.`));let d=f({jurisdiction:p(n.jurisdiction,`jurisdiction`,`text`),name:p(n.name,`name`,`text`),primary_location_hint:p(n[`primary-location-hint`],`primary-location-hint`,`text`),read_replication:{mode:p(n[`read-replication-mode`],`read-replication-mode`,`text`)}}),h=await s(`Creating`,async()=>c.d1.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function re(e){return e.usage(`$0 d1 delete <database-id>
5
+
6
+ Delete a D1 database.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete <database-id>`,describe:`Delete D1 Database`,builder:re,handler:async n=>l({command:`d1 delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){let e=await r();o({command:`cf d1 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}`,pathParams:{"database-id":String(n[`database-id`]??``)},bodyKind:`none`});return}let c=await t(n),l=n.local?e:await i();if(n.accountId=l,!await g({force:!!n.force,message:`This permanently deletes the D1 database and all of its data.`})){process.stderr.write(`Aborted.
7
+ `);return}let u=await s(`Deleting`,async()=>c.d1.delete({account_id:l,database_id:n[`database-id`]}));a(u,{successLabel:`Deleted`})})};function ae(e){return e.usage(`$0 d1 edit <database-id>
8
+
9
+ Partially update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).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 oe={command:`edit <database-id>`,describe:`Update D1 Database partially`,builder:ae,handler:async n=>l({command:`d1 edit`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){let e=await r();o({command:`cf d1 edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}`,pathParams:{"database-id":String(n[`database-id`]??``)},bodyKind:`json`,body:n.body===void 0?f({read_replication:{mode:p(n[`read-replication-mode`],`read-replication-mode`,`text`)}}):u(n.body)});return}let c=await t(n),l=n.local?e:await i();if(n.accountId=l,n.body){let e=u(n.body),t=await s(`Updating`,async()=>c.d1.edit({...e,account_id:l,database_id:n[`database-id`]}));a(t,{successLabel:`Updated`});return}let d=f({read_replication:{mode:p(n[`read-replication-mode`],`read-replication-mode`,`text`)}}),m=await s(`Updating`,async()=>c.d1.edit({...d,account_id:l,database_id:n[`database-id`]}));a(m,{successLabel:`Updated`})})};function se(e){return e.usage(`$0 d1 get <database-id>
10
+
11
+ Get details for a specific D1 database.`).positional(`database-id`,{type:`string`,description:`Database ID`,demandOption:!0}).option(`fields`,{type:`string`,description:`Comma-separated list of fields to include in the response. When omitted,
12
+ all fields are returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <database-id>`,describe:`Get D1 Database`,builder:ee(se),handler:async n=>l({command:`d1 get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let c={fields:n.fields};if(n.dryRun){let e=await r();o({command:`cf d1 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}`,pathParams:{"database-id":String(n[`database-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(n),u=n.local?e:await i();n.accountId=u;let d=await s(`Loading`,async()=>l.d1.get({account_id:u,database_id:n[`database-id`],...c}));a(d,{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 d1 list
13
+
14
+ List D1 databases in your account.`).option(`name`,{type:`string`,description:`a database name to search for.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List D1 Databases`,builder:le,handler:async n=>l({command:`d1 list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let c={name:n.name,page:n.page,per_page:n[`per-page`]};if(n.dryRun){let e=await r();o({command:`cf d1 list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(n),u=n.local?e:await i();n.accountId=u;let d=await s(`Loading`,async()=>l.d1.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 d1 query <database-id>
15
+
16
+ Execute a SQL query against a D1 database and return results as objects.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const fe={command:`query <database-id>`,describe:`Query D1 Database`,builder:de,handler:async n=>l({command:`d1 query`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await r();o({command:`cf d1 query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}/query`,pathParams:{"database-id":String(n[`database-id`]??``)},bodyKind:`json`,body:n.body===void 0?f({params:n.params,sql:p(n.sql,`sql`,`text`),batch:d(n.batch,`batch`)}):u(n.body)});return}let c=await t(n),l=n.local?e:await i();if(n.accountId=l,n.body){let e=u(n.body),t=await s(`Loading`,async()=>c.d1.query({body:e,account_id:l,database_id:n[`database-id`]}));a(t,{successLabel:`Loaded`});return}let m=f({params:n.params,sql:p(n.sql,`sql`,`text`),batch:d(n.batch,`batch`)}),h=await s(`Loading`,async()=>c.d1.query({body:m,account_id:l,database_id:n[`database-id`]}));a(h,{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 d1 raw <database-id>
17
+
18
+ Execute a SQL query against a D1 database and return result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const me={command:`raw <database-id>`,describe:`Raw D1 Database query`,builder:pe,handler:async n=>l({command:`d1 raw`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){let e=await r();o({command:`cf d1 raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}/raw`,pathParams:{"database-id":String(n[`database-id`]??``)},bodyKind:`json`,body:n.body===void 0?f({params:n.params,sql:p(n.sql,`sql`,`text`),batch:d(n.batch,`batch`)}):u(n.body)});return}let c=await t(n),l=n.local?e:await i();if(n.accountId=l,n.body){let e=u(n.body),t=await s(`Loading`,async()=>c.d1.raw({body:e,account_id:l,database_id:n[`database-id`]}));a(t,{successLabel:`Loaded`});return}let m=f({params:n.params,sql:p(n.sql,`sql`,`text`),batch:d(n.batch,`batch`)}),h=await s(`Loading`,async()=>c.d1.raw({body:m,account_id:l,database_id:n[`database-id`]}));a(h,{successLabel:`Loaded`})})};function he(e){return e.usage(`$0 d1 time-travel get-bookmark <database-id>
19
+
20
+ Retrieve the current bookmark, or the nearest bookmark at or before a provided timestamp. Bookmarks can be used with the restore endpoint to revert the database to a previous point in time.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`timestamp`,{type:`string`,description:`An optional ISO 8601 timestamp. If provided, returns the nearest available bookmark at or before this timestamp. If omitted, returns the current bookmark.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get-bookmark <database-id>`,describe:`Get D1 database bookmark`,builder:he,handler:async n=>l({command:`d1 time-travel get-bookmark`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let c={timestamp:n.timestamp};if(n.dryRun){let e=await r();o({command:`cf d1 time-travel get-bookmark`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}/time_travel/bookmark`,pathParams:{"database-id":String(n[`database-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(n),u=n.local?e:await i();n.accountId=u;let d=await s(`Loading`,async()=>l.d1.timeTravel.getBookmark({account_id:u,database_id:n[`database-id`],...c}));a(d,{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 d1 time-travel restore <database-id>
21
+
22
+ Restore a D1 database to a previous point in time either via a bookmark or a timestamp.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`bookmark`,{type:`string`,description:"A bookmark to restore the database to. Required if `timestamp` is not provided."}).option(`timestamp`,{type:`string`,description:"An ISO 8601 timestamp to restore the database to. Required if `bookmark` is not provided."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ve={command:`restore <database-id>`,describe:`Restore D1 Database to a bookmark or point in time`,builder:_e,handler:async n=>l({command:`d1 time-travel restore`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{let c={bookmark:n.bookmark,timestamp:n.timestamp};if(n.dryRun){let e=await r();o({command:`cf d1 time-travel restore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}/time_travel/restore`,pathParams:{"database-id":String(n[`database-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(n),u=n.local?e:await i();if(n.accountId=u,!await g({force:!!n.force,message:`This reverts the D1 database to a previous point in time. Data written after the bookmark will be lost.`})){process.stderr.write(`Aborted.
23
+ `);return}let d=await s(`Deleting`,async()=>l.d1.timeTravel.restore({account_id:u,database_id:n[`database-id`],...c}));a(d,{successLabel:`Deleted`})})},ye={command:`time-travel`,describe:`use specific point-in-time backups of your D1 database`,builder:e=>e.command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.usage(`$0 d1 update <database-id>
24
+
25
+ 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 xe={command:`update <database-id>`,describe:`Update D1 Database`,builder:be,handler:async n=>l({command:`d1 update`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},n,async()=>{if(n.dryRun){let e=await r();o({command:`cf d1 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database/${n[`database-id`]==null?`<database-id>`:encodeURIComponent(String(n[`database-id`]))}`,pathParams:{"database-id":String(n[`database-id`]??``)},bodyKind:`json`,body:n.body===void 0?f({read_replication:{mode:p(n[`read-replication-mode`],`read-replication-mode`,`text`)}}):u(n.body)});return}let c=await t(n),l=n.local?e:await i();if(n.accountId=l,n.body){let e=u(n.body),t=await s(`Updating`,async()=>c.d1.update({...e,account_id:l,database_id:n[`database-id`]}));a(t,{successLabel:`Updated`});return}n[`read-replication-mode`]===void 0&&(n[`read-replication-mode`]=await h(`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(n[`read-replication-mode`],`read-replication-mode`,`text`)}}),m=await s(`Updating`,async()=>c.d1.update({...d,account_id:l,database_id:n[`database-id`]}));a(m,{successLabel:`Updated`})})},b=(e,t,n)=>{let r=e instanceof RegExp?Se(e,n):e,i=t instanceof RegExp?Se(t,n):t,a=r!==null&&i!=null&&Ce(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)}},Se=(e,t)=>{let n=t.match(e);return n?n[0]:null},Ce=(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},we=`\0SLASH`+Math.random()+`\0`,x=`\0OPEN`+Math.random()+`\0`,S=`\0CLOSE`+Math.random()+`\0`,Te=`\0COMMA`+Math.random()+`\0`,C=`\0PERIOD`+Math.random()+`\0`,Ee=new RegExp(we,`g`),De=new RegExp(x,`g`),Oe=new RegExp(S,`g`),ke=new RegExp(Te,`g`),Ae=new RegExp(C,`g`),je=/\\\\/g,Me=/\\{/g,Ne=/\\}/g,Pe=/\\,/g,Fe=/\\\./g;function w(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Ie(e){return e.replace(je,we).replace(Me,x).replace(Ne,S).replace(Pe,Te).replace(Fe,C)}function Le(e){return e.replace(Ee,`\\`).replace(De,`{`).replace(Oe,`}`).replace(ke,`,`).replace(Ae,`.`)}function T(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function Re(e){let t=[],n=``;for(;;){let r=b(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],T(t,r),t}let{pre:i,body:a,post:o}=r,s=i.split(`,`);if(s[0]=n+s[0],s[s.length-1]+=`{`+a+`}`,!o.length)return T(t,s),t;n=s.pop(),T(t,s),e=o}}function ze(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),D(Ie(e),n,r,i,0,a,!0).map(Le)}function Be(e){return`{`+e+`}`}function Ve(e){return/^-?0\d/.test(e)}function He(e,t){return e<=t}function Ue(e,t){return e>=t}function E(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!a||u){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function We(e,t,n,r){let i=e.split(/\.\./),a=[];
26
+ /* c8 ignore start */
27
+ if(i[0]===void 0||i[1]===void 0)return a;
28
+ /* c8 ignore stop */
29
+ let o=w(i[0]),s=w(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(w(i[2])),1):1,u=He;s<o&&(l*=-1,u=Ue);let d=i.some(Ve),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function D(e,t,n,r,i,a,o){if(i>r)return[e];let s=[``],c=0,l=!1,u=!0;for(;;){let d=b(`{`,`}`,e);if(!d)return E(s,e,[``],t,n,l);let f=d.pre;if(/\$$/.test(f)){if(s=E(s,f+`{`+d.body+`}`,[``],t,n,l&&!d.post.length),u=!1,!d.post.length)break;e=d.post;continue}let p=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(d.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(d.body),h=p||m,g=d.body.indexOf(`,`)>=0;if(!h&&!g){if(c<a&&d.post.match(/,(?!,).*\}/)){c++,e=d.pre+`{`+d.body+S+d.post,o=!0;continue}return E(s,f+`{`+d.body+`}`+d.post,[``],t,n,l)}u&&=(l=o&&!h,!1);let _;if(h)_=We(d.body,m,t,n);else{let o=Re(d.body);if(o.length===1&&o[0]!==void 0&&(o=D(o[0],t,n,r,i+1,a,!1).map(Be),o.length===1)){if(s=E(s,f+o[0],[``],t,n,l&&!d.post.length),!d.post.length)break;e=d.post;continue}let c=l&&!d.post.length&&!f;for(let e=0;c&&e<s.length;e++)s[e]&&(c=!1);_=[];let u=0;outer:for(let e=0;e<o.length;e++){let s=D(o[e],t,n,r,i+1,a,!1);for(let e=0;e<s.length;e++){let r=s[e];if(!c||r){if(_.length>=t||u+r.length>n)break outer;_.push(r),u+=r.length}}}}if(s=E(s,f,_,t,n,l&&!d.post.length),!d.post.length)break;e=d.post}return s}const O=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Ge={"[: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]},k=e=>e.replace(/[[\]\\-]/g,`\\$&`),Ke=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),A=e=>e.join(``),qe=(e,t)=>{let n=t;
30
+ /* c8 ignore start */
31
+ if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);
32
+ /* c8 ignore stop */
33
+ 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(Ge))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(k(d)+`-`+k(t)):t===d&&r.push(k(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(k(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(k(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let e=r[0].length===2?r[0].slice(-1):r[0];return[Ke(e),!1,u-n,!1]}let f=`[`+(l?`^`:``)+A(r)+`]`,p=`[`+(l?``:`^`)+A(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},j=(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 M;const Je=/* @__PURE__ */ new Set([`!`,`?`,`+`,`*`,`@`]),N=e=>Je.has(e),Ye=e=>N(e.type),Xe=/* @__PURE__ */ new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),Ze=/* @__PURE__ */ new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),Qe=/* @__PURE__ */ new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),P=/* @__PURE__ */ new Map([[`!`,/* @__PURE__ */ new Map([[`!`,`@`]])],[`?`,/* @__PURE__ */ new Map([[`*`,`*`],[`+`,`*`]])],[`@`,/* @__PURE__ */ new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,/* @__PURE__ */ new Map([[`?`,`*`],[`*`,`*`]])]]),F=`(?!\\.)`,$e=/* @__PURE__ */ new Set([`[`,`.`]),et=/* @__PURE__ */ new Set([`..`,`.`]),tt=/* @__PURE__ */ new Set(`().*{}+?[]^$\\!`),nt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),I=`[^/]+?`;let rt=0;var L=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++rt;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){
34
+ /* c8 ignore start */
35
+ if(this.#t!==void 0)return this.#t;
36
+ /* c8 ignore stop */
37
+ 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.#l=this.type?this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#r.map(e=>String(e)).join(``):this.#l}#d(){
38
+ /* c8 ignore start */
39
+ 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){
40
+ /* c8 ignore start */
41
+ if(typeof t==`string`)throw Error(`string part in extglob AST??`);
42
+ /* c8 ignore stop */
43
+ t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){
44
+ /* c8 ignore start */
45
+ if(typeof t!=`string`&&!(t instanceof M&&t.#i===this))throw Error(`invalid part: `+t);
46
+ /* c8 ignore stop */
47
+ 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 M&&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();
48
+ /* c8 ignore start */
49
+ let e=this.#i?this.#i.#r.length:0;
50
+ /* c8 ignore stop */
51
+ return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new M(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&N(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new M(n,t);u=M.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new M(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}
52
+ /* c8 ignore stop */
53
+ if(!r.noext&&N(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 M(n,d);d.push(o),u=M.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new M(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,Ze)}#m(e,t=Xe){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=Qe){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new M(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!!P.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=P.get(this.type),n=e.#r[0],r=t?.get(n.type);
54
+ /* c8 ignore start - impossible */
55
+ if(!r)return!1;
56
+ /* c8 ignore stop */
57
+ 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 M(null,void 0,t);return M.#f(e,n,0,t,0),n}toMMPattern(){
58
+ /* c8 ignore start */
59
+ if(this!==this.#e)return this.#e.toMMPattern();
60
+ /* c8 ignore stop */
61
+ 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()),!Ye(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`?M.#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&&et.has(this.#r[0]))){let n=$e,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?F:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,j(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,j(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?F:``)+I;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?F:``)+`[^/]*?)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,j(i),this.#t=!!this.#t,this.#n]}#x(){if(Ye(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=>{
62
+ /* c8 ignore start */
63
+ if(typeof t==`string`)throw Error(`string type in extglob ast??`);
64
+ /* c8 ignore stop */
65
+ 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+=(tt.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?I:`[^/]*?`,t=!0;continue}if(o=!1,c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=qe(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=`[^/]`,t=!0;continue}i+=nt(c)}return[i,j(e),!!t,a]}};M=L;const it=(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={})=>(O(t),!n.nocomment&&t.charAt(0)===`#`?!1:new q(t,n).match(e)),at=/^\*+([^+@!?*[(]*)$/,ot=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),st=e=>t=>t.endsWith(e),ct=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),lt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ut=/^\*+\.\*+$/,dt=e=>!e.startsWith(`.`)&&e.includes(`.`),ft=e=>e!==`.`&&e!==`..`&&e.includes(`.`),pt=/^\.\*+$/,mt=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),ht=/^\*+$/,gt=e=>e.length!==0&&!e.startsWith(`.`),_t=e=>e.length!==0&&e!==`.`&&e!==`..`,vt=/^\?+([^+@!?*[(]*)?$/,yt=([e,t=``])=>{let n=z([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},bt=([e,t=``])=>{let n=B([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},xt=([e,t=``])=>{let n=B([e]);return t?e=>n(e)&&e.endsWith(t):n},St=([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{
66
+ /* c8 ignore start */
67
+ constructor(t,n,r={}){super(t,n,W(e,r))}
68
+ /* c8 ignore stop */
69
+ 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={})=>(O(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:ze(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=/[?*]|[+@!]\(.*?\)|\[|\]/,Ct=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={}){O(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 h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+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];
70
+ /* c8 ignore start */
71
+ if(this.debug(t,n,r),n===!1||n===U)return!1;
72
+ /* c8 ignore stop */
73
+ 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?`)
74
+ /* c8 ignore stop */
75
+ }braceExpand(){return G(this.pattern,this.options)}parse(e){O(e);let t=this.options;if(e===`**`)return U;if(e===``)return``;let n,r=null;(n=e.match(ht))?r=t.dot?_t:gt:(n=e.match(at))?r=(t.nocase?t.dot?lt:ct:t.dot?st:ot)(n[1]):(n=e.match(vt))?r=(t.nocase?t.dot?bt:yt:t.dot?xt:St)(n):(n=e.match(ut))?r=t.dot?ft:dt:(n=e.match(pt))&&(r=mt);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`?Ct(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}
76
+ /* c8 ignore stop */
77
+ 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&&this.negate}static defaults(e){return R.defaults(e).Minimatch}};R.AST=L,R.Minimatch=q,R.escape=it,R.unescape=j;function J(e){let t=e.replace(/\\/g,`/`),n=y.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 wt(e){return`CREATE TABLE IF NOT EXISTS ${X(e)}(
78
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
79
+ name TEXT UNIQUE,
80
+ applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
81
+ );`}function Tt(e){return`SELECT *
82
+ FROM ${X(e)}
83
+ ORDER BY id`}function Et(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:y.resolve(e.cwd??process.cwd(),t),migrationsDir:t,migrationsPattern:r,migrationsTableName:e.table??`d1_migrations`}}function Dt(e,t){let n=[],r=[{abs:e,rel:``}];for(;r.length>0;){let{abs:e,rel:i}=r.pop(),a;try{a=v.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:y.join(e,o.name),rel:a}):o.isFile()&&t.match(a)&&n.push(a)}}return n.sort(kt)}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 kt(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 At(e){let t=Y(e.migrationsPattern,e.migrationsDir);return Dt(e.migrationsPath,new q(t,{dot:!1}))}function jt(e,t){let n=[];for(let r of e)t.includes(r)||n.push(r);return n}function Mt(e){let t=At(e).map(e=>Z(e)).filter(e=>Number.isFinite(e));return Math.max(...t,0)+1}function Nt(e){if(Dt(e.migrationsPath,new q(`*/migration.sql`,{dot:!1})).length!==0)return J(`${e.migrationsDir}/*/migration.sql`)}function Pt(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===`
84
+ `?(t+=`
85
+ `,a++,r=!1):(t+=o,r=o!==`
86
+ `);continue}if(i){o===`\r`&&s===`
87
+ `?(t+=`
88
+ `,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===`
89
+ `){t+=`
90
+ `,a++;continue}t+=o}return t}function Ft({migrationsPath:e,migrationName:t,migrationsTableName:n}){return`${v.readFileSync(y.join(e,t),`utf8`)}
91
+ INSERT INTO ${X(n)} (name)
92
+ values ('${t.replace(/'/g,`''`)}');`}function It(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 It(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:Pt(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 Lt(r){if(!n(r.database))throw Error(`Expected a D1 database ID, but received <database>=${JSON.stringify(r.database)}. Database names and binding names are not accepted.`);let a=Et({dir:r.dir,pattern:r.pattern,table:r.table});if(!v.existsSync(a.migrationsPath))throw Error(`No migrations directory at ${a.migrationsPath}.`+(r.dir===void 0?` Pass --dir to point at one.`:``));return{client:await t(r),accountId:r.local?e:await i(),databaseId:r.database,config:a,local:r.local===!0}}async function Rt(e){let{client:t,accountId:n,databaseId:r,config:i}=e;await $(t,n,r,wt(i.migrationsTableName),`Preparing`,e.local);let a=(await $(t,n,r,Tt(i.migrationsTableName),`Loading`,e.local))[0].results.map(e=>e.name),o=At(i);if(o.length===0){let e=Nt(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:jt(o,a)}}function zt(e){return Q(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const Bt={command:`apply <database>`,describe:`Apply any unapplied D1 migrations`,builder:zt,handler:async e=>{let t=await Lt(e),n=(await Rt(t)).unapplied.map(e=>({name:e,status:`🕒️`}));if(n.length===0){a([],{successLabel:`No migrations to apply`,quiet:e.quiet});return}if(await _(`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=Ft({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(`
93
+ `))}a(n,{quiet:e.quiet})}}};function Vt(e){return It(e.positional(`message`,{type:`string`,description:`Describes what the migration does`,demandOption:!0}))}const Ht={command:`create <message>`,describe:`Create a new empty D1 migration file`,builder:Vt,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=Et({dir:e.dir,pattern:e.pattern}),n=Ut(Mt(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(!v.existsSync(t.migrationsPath)){if(!await _(`No migrations folder found.\nOk to create ${t.migrationsPath}?`))throw Error(`No migrations folder present at ${t.migrationsPath}.`);v.mkdirSync(t.migrationsPath,{recursive:!0})}let s=y.join(t.migrationsPath,i);v.writeFileSync(s,`-- Migration number: ${n} \t ${(/* @__PURE__ */ new Date()).toISOString()}\n`),a({name:i,path:s},{successLabel:`Created ${i}`,quiet:e.quiet})}};function Ut(e,t){let n=e.toString();for(;n.length<t;)n=`0`+n;return n}function Wt(e){return Q(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const Gt={command:`list <database>`,describe:`View a list of unapplied migration files`,builder:Wt,handler:async e=>{let{unapplied:t}=await Rt(await Lt(e));a(t.map(e=>({Name:e})),{quiet:e.quiet})}},Kt={command:`migrations`,describe:`Create, list, and apply D1 database migrations`,builder:e=>e.command(c(Bt,{command:`d1 migrations apply`,classification:{safeFlags:[]}})).command(c(Ht,{command:`d1 migrations create`,classification:{safeFlags:[]}})).command(c(Gt,{command:`d1 migrations list`,classification:{safeFlags:[]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},qt={command:`d1`,describe:`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,builder:e=>e.command(ne).command(ie).command(oe).command(ce).command(ue).command(fe).command(me).command(xe).command(Kt).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{qt as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";function o(e){return e.usage(`$0 dcv-delegation get
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function o(e){return e.usage(`$0 dcv-delegation get
3
3
 
4
- Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Retrieve the DCV Delegation unique identifier.`,builder:o,handler:async o=>a({command:`dcv-delegation get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf dcv-delegation get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/dcv_delegation/uuid`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.dcvDelegation.get({zone_id:s})),{successLabel:`Loaded`})})},c={command:`dcv-delegation`,describe:`dcv-delegation`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
4
+ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Retrieve the DCV Delegation unique identifier.`,builder:o,handler:async o=>a({command:`dcv-delegation get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf dcv-delegation get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/dcv_delegation/uuid`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.dcvDelegation.get({zone_id:s}));n(c,{successLabel:`Loaded`})})},c={command:`dcv-delegation`,describe:`dcv-delegation`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
package/dist/delegate.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,i as t,n,r,t as i}from"./delegate-CCGgla7X.mjs";export{i as DELEGATION_SENTINEL,n as isEphemeralExecRun,r as maybeDelegateFromProcess,t as maybeDelegateToLocalInstall,e as resolveDelegateTarget};
2
+ import{a as e,i as t,n,r,t as i}from"./delegate-Tgfxa-MZ.mjs";export{i as DELEGATION_SENTINEL,n as isEphemeralExecRun,r as maybeDelegateFromProcess,t as maybeDelegateToLocalInstall,e as resolveDelegateTarget};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e,t}from"./shared-BPjcpXuA.mjs";function n(t){return e(t).option(`provision`,{type:`boolean`,description:`Automatically provision resources for bindings that need them`,default:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const r={command:`deploy`,describe:`Deploy a worker to Cloudflare`,builder:n,handler:async e=>{await t(e,{command:`Deploy`})}};export{r as default};