cf 1.0.0-beta.8 → 1.0.0-beta.9

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 (248) hide show
  1. package/dist/_meta/commands.json +546 -25
  2. package/dist/_meta/schemas.json +400 -1
  3. package/dist/{abuse-reports-D9LttL99.mjs → abuse-reports-LBVv-g3M.mjs} +1 -1
  4. package/dist/{access-CSUG9fDH.mjs → access-lTeHFhwl.mjs} +1 -1
  5. package/dist/{account-tags-BkmuF6bd.mjs → account-tags-BJOkTRcJ.mjs} +1 -1
  6. package/dist/{accounts-CmqKD3xG.mjs → accounts-CxfmZ26h.mjs} +1 -1
  7. package/dist/{acm-D9WirG6Y.mjs → acm-Lwxk9U-L.mjs} +1 -1
  8. package/dist/{addressing-DAdzF3M5.mjs → addressing-C4Y5vVvy.mjs} +1 -1
  9. package/dist/{agent-memory-CIEk0dD-.mjs → agent-memory-DD0BUFmc.mjs} +1 -1
  10. package/dist/{ai-Dq1GOYn7.mjs → ai-D9GX6Huo.mjs} +1 -1
  11. package/dist/{ai-audit-D5XtqDkx.mjs → ai-audit-COn-Iiyc.mjs} +1 -1
  12. package/dist/{ai-gateway-D16_7Zbq.mjs → ai-gateway-CYMqceyk.mjs} +16 -14
  13. package/dist/{ai-search-Ce3p9ccc.mjs → ai-search-DbpDgJAl.mjs} +1 -1
  14. package/dist/{ai-security-BodoNshv.mjs → ai-security-bRPA5p1v.mjs} +1 -1
  15. package/dist/{alerting-DuF0tdhO.mjs → alerting-Bo1lxRbE.mjs} +1 -1
  16. package/dist/{analytics-DmnqxoBT.mjs → analytics-85GRwRHh.mjs} +4 -5
  17. package/dist/{analytics_engine-BOYHgzoX.mjs → analytics_engine-DgSsozQ2.mjs} +1 -1
  18. package/dist/{api-security-B3v-EKrg.mjs → api-security-B0Y0gif0.mjs} +1 -1
  19. package/dist/{argo-BsSvWev6.mjs → argo-BFxaIesT.mjs} +1 -1
  20. package/dist/{artifacts-Dq5t2ZQO.mjs → artifacts-DicFDolv.mjs} +2 -2
  21. package/dist/{audit-logs-DpszUSNO.mjs → audit-logs-DN1mQRY_.mjs} +1 -1
  22. package/dist/{auth-BjxUTZWb.mjs → auth-C_-fMmUL.mjs} +2 -2
  23. package/dist/{auth-skaSvH3I.mjs → auth-CeiDicp4.mjs} +1 -1
  24. package/dist/{autoconfig-DXXV-Xyz.mjs → autoconfig-DPUztTL2.mjs} +1 -1
  25. package/dist/{basin-catalog-c_Z-KmdC.mjs → basin-catalog-CLd6aFV_.mjs} +1 -1
  26. package/dist/{billing-D8eSkPUk.mjs → billing-sbqGqYgk.mjs} +1 -1
  27. package/dist/{bot-management-gPqJF81w.mjs → bot-management-BDZwYRbv.mjs} +1 -1
  28. package/dist/{botnet-feed-B1TeX5OO.mjs → botnet-feed-BDs84Rk7.mjs} +1 -1
  29. package/dist/{brand-protection-jjdTCYeF.mjs → brand-protection-D4-67mgV.mjs} +1 -1
  30. package/dist/{browser-run-CkmofJ6D.mjs → browser-run-Cw4OgHMC.mjs} +1 -1
  31. package/dist/{build-B-tN7mO-.mjs → build-B5UYMEQH.mjs} +1 -1
  32. package/dist/build-DLZ9gBNA.mjs +2 -0
  33. package/dist/{builds-Ca9hPvgz.mjs → builds-CdS0Jjme.mjs} +1 -1
  34. package/dist/{cache-BnRnlPjP.mjs → cache-574Higpi.mjs} +1 -1
  35. package/dist/{certificate-authorities-D2J5rh-m.mjs → certificate-authorities-RpWY-yHx.mjs} +1 -1
  36. package/dist/{cli-xbKU3h28.mjs → cli-CIu0GeU7.mjs} +1 -1
  37. package/dist/{client-certificates-D3mKJGFa.mjs → client-certificates-C-aZxVUT.mjs} +1 -1
  38. package/dist/{client-side-security-DcO8apX2.mjs → client-side-security-ChUBdwcX.mjs} +1 -1
  39. package/dist/{cloud-connector-CCbT4xFi.mjs → cloud-connector-DTHuCkjj.mjs} +1 -1
  40. package/dist/{cloudforce-one-Cnj0OnZF.mjs → cloudforce-one-DiOsWYK2.mjs} +1 -1
  41. package/dist/{command-BxrOxsu9.mjs → command-4-_i7Drg.mjs} +1 -1
  42. package/dist/{command-8lsstsSi.mjs → command-BCag-xjk.mjs} +1 -1
  43. package/dist/{command-_4j_XD3U.mjs → command-BLJaqN2i.mjs} +1 -1
  44. package/dist/{command-BUWmTl5w.mjs → command-BS0D67wS.mjs} +1 -1
  45. package/dist/{command-CwsA28Vt.mjs → command-Bp-Ono5h.mjs} +1 -1
  46. package/dist/{command-D5vy9tlg.mjs → command-DFPF1MDP.mjs} +1 -1
  47. package/dist/{command-CUQF-QFP.mjs → command-DPZl5lDW.mjs} +1 -1
  48. package/dist/{command-CvzUv83h.mjs → command-DUafPVUr.mjs} +1 -1
  49. package/dist/{command-BtmIP6e1.mjs → command-DfffeX-k.mjs} +1 -1
  50. package/dist/{command-BvwvCWkB.mjs → command-DmCeLhAR.mjs} +1 -1
  51. package/dist/{command-BDCTd8Ra.mjs → command-DzHL5LKI.mjs} +1 -1
  52. package/dist/{command-BWUoVso3.mjs → command-HpcRetCI.mjs} +1 -1
  53. package/dist/{command-DwbJIcAA.mjs → command-qX0mcMdJ.mjs} +1 -1
  54. package/dist/{command-B9rrie65.mjs → command-siVEvKhD.mjs} +1 -1
  55. package/dist/{completions-EHied_ON.mjs → completions-Ksnj6C10.mjs} +1 -1
  56. package/dist/{connector-interrupts-CyeiC7gw.mjs → connector-interrupts-BMVVtRoe.mjs} +1 -1
  57. package/dist/{connector-telemetry-events-D-cL2RuW.mjs → connector-telemetry-events-BVIKzaGu.mjs} +1 -1
  58. package/dist/{connector-telemetry-snapshots-MrpBZ5fC.mjs → connector-telemetry-snapshots-ChUsGxJA.mjs} +1 -1
  59. package/dist/{connectors-Ds5PWdpP.mjs → connectors-v5tsuazm.mjs} +1 -1
  60. package/dist/{containers-D9masRwv.mjs → containers-CkVjC4WK.mjs} +1 -1
  61. package/dist/{containers-BR6paNcL.mjs → containers-D2NT0_6_.mjs} +1 -1
  62. package/dist/{content-scan-eX3wIB8J.mjs → content-scan-BhPn2Ri6.mjs} +1 -1
  63. package/dist/{context-M2Ho8pi3.mjs → context-Cibc7DIM.mjs} +1 -1
  64. package/dist/{cps-CyviY22M.mjs → cps-DjsEAp0Y.mjs} +1 -1
  65. package/dist/{csamScanner-CHF53DZw.mjs → csamScanner-NxvG2dHV.mjs} +1 -1
  66. package/dist/{ct-alerting-BORxnBtn.mjs → ct-alerting-Bx2UZEx6.mjs} +1 -1
  67. package/dist/{custom-certificates-KsS8xnfG.mjs → custom-certificates-nNHIgfAg.mjs} +1 -1
  68. package/dist/{custom-csrs-BtNQaSVn.mjs → custom-csrs-CWQYjo1J.mjs} +1 -1
  69. package/dist/{custom-hostnames-4tLpHtCK.mjs → custom-hostnames-Ba-AX6GI.mjs} +1 -1
  70. package/dist/{custom-nameservers-DYM29vGA.mjs → custom-nameservers-CBYeF3EA.mjs} +1 -1
  71. package/dist/{custom-pages-BIwM1IyN.mjs → custom-pages-B8npWgUd.mjs} +1 -1
  72. package/dist/{d1-Yhj_t0--.mjs → d1-C1jAzZdm.mjs} +1 -1
  73. package/dist/{dcv-delegation-DXspPfEr.mjs → dcv-delegation-BcWil-n0.mjs} +1 -1
  74. package/dist/{deploy-su0BR90P.mjs → deploy-C1YhIsYf.mjs} +1 -1
  75. package/dist/{deploy-input-DJWWJs3a.mjs → deploy-input-DTjBGloL.mjs} +1 -1
  76. package/dist/{dev-DqgkwmRH.mjs → dev-BML-bpNU.mjs} +1 -1
  77. package/dist/{diagnostics-B6FqDbQY.mjs → diagnostics-Dhv2hv7H.mjs} +1 -1
  78. package/dist/discover-DwczTkRX.mjs +2 -0
  79. package/dist/{dist-CxGYQfpW.mjs → dist-BOwFXRl5.mjs} +1 -1
  80. package/dist/{dls-CDvZjyjo.mjs → dls-D1r38j3_.mjs} +1 -1
  81. package/dist/{dns-DGMcGcBE.mjs → dns-BRFzX8NU.mjs} +1 -1
  82. package/dist/{dns-firewall-BahlWOJO.mjs → dns-firewall-DtLBYFPM.mjs} +1 -1
  83. package/dist/{durable-objects-Cnho3J7w.mjs → durable-objects-C2Aefs4L.mjs} +1 -1
  84. package/dist/{email-auth-CkqeIq8V.mjs → email-auth-YiFzQwVf.mjs} +1 -1
  85. package/dist/{email-routing-D_Mw8HSX.mjs → email-routing-z-z1rYZH.mjs} +1 -1
  86. package/dist/{email-security-D9yMRsXl.mjs → email-security-CGmTS-uF.mjs} +1 -1
  87. package/dist/{email-sending-CQfuE7h6.mjs → email-sending-D29kFQug.mjs} +1 -1
  88. package/dist/{error-sanitization-BXqhvJsR.mjs → error-sanitization-CJ5OLJrh.mjs} +1 -1
  89. package/dist/error-sanitization-hmi1CqE5.mjs +2 -0
  90. package/dist/{fieldExtractors-Bbbegy-c.mjs → fieldExtractors-pYznM75V.mjs} +1 -1
  91. package/dist/{firewall-DtlT_8mG.mjs → firewall-CZo7QDd9.mjs} +1 -1
  92. package/dist/{flagship-BWEdMJSQ.mjs → flagship-CXnjhYkL.mjs} +1 -1
  93. package/dist/{fraud-mszBJHV6.mjs → fraud-CSqdPZ71.mjs} +1 -1
  94. package/dist/generate-BPqoDbck.mjs +2 -0
  95. package/dist/{google-tag-gateway-DD8rztUs.mjs → google-tag-gateway-DX20Ia5e.mjs} +1 -1
  96. package/dist/{healthchecks-CzCJR3df.mjs → healthchecks-n2tjszDt.mjs} +1 -1
  97. package/dist/{hostnames-BTSxAv-T.mjs → hostnames-CCg1WdH6.mjs} +1 -1
  98. package/dist/{hyperdrive-Bg1T58qE.mjs → hyperdrive-GECLKycn.mjs} +1 -1
  99. package/dist/{iam-cAzxdXI7.mjs → iam-C4CHSG7c.mjs} +1 -1
  100. package/dist/{images-CfHt8v2n.mjs → images-6Cs-Feuz.mjs} +1 -1
  101. package/dist/index.mjs +1 -1
  102. package/dist/{init-9TwyFuzD.mjs → init-fa1wFHUX.mjs} +2 -2
  103. package/dist/{intel-WWPG0-t7.mjs → intel-DiCFqJET.mjs} +1 -1
  104. package/dist/{ips-CxSw5R88.mjs → ips-Bq1BTfPF.mjs} +1 -1
  105. package/dist/k2-BAQnWQIM.mjs +13 -0
  106. package/dist/{keyless-certificates-Jfsyada7.mjs → keyless-certificates-CZftNR60.mjs} +1 -1
  107. package/dist/{keys-BrDarg28.mjs → keys-BFqSZOfP.mjs} +1 -1
  108. package/dist/{kv-C8eauBSy.mjs → kv-Dpo1EtAM.mjs} +1 -1
  109. package/dist/{lazy-command-B0914_IJ.mjs → lazy-command-C8fVcK9z.mjs} +1 -1
  110. package/dist/{leaked-credential-checks-Y9mDSJKn.mjs → leaked-credential-checks-twflfhgD.mjs} +1 -1
  111. package/dist/{load-balancers-DsKJIF_U.mjs → load-balancers-DywhdyKf.mjs} +1 -1
  112. package/dist/{local-CQc36Viv.mjs → local-B5oRPTEN.mjs} +1 -1
  113. package/dist/local-Bj-l0TP6.mjs +2 -0
  114. package/dist/{local-runtime-CifOYlPq.mjs → local-runtime-CZnegFEM.mjs} +1 -1
  115. package/dist/{login-DGXSiCII.mjs → login-BWuV_6Ti.mjs} +1 -1
  116. package/dist/{login-DFZ3DEjI.mjs → login-CStejTNn.mjs} +1 -1
  117. package/dist/{logo-matches-D1vjZF-k.mjs → logo-matches-BbuNQTBr.mjs} +1 -1
  118. package/dist/{logos-CCEIMvE7.mjs → logos-mAj8GzO0.mjs} +1 -1
  119. package/dist/{logpush-DAx2y5MY.mjs → logpush-riOF9-YV.mjs} +1 -1
  120. package/dist/{logs-D9BsByMt.mjs → logs-DITH6eet.mjs} +1 -1
  121. package/dist/{magic-cloud-networking-C_FsIQoS.mjs → magic-cloud-networking-trqm-ciY.mjs} +1 -1
  122. package/dist/{magic-network-monitoring-DBo1mI3a.mjs → magic-network-monitoring-CF0uR3b_.mjs} +1 -1
  123. package/dist/{magic-transit-BgRq6ZeA.mjs → magic-transit-438AP90W.mjs} +1 -1
  124. package/dist/{managed-defense-BRdCrVVh.mjs → managed-defense-Criu9sDQ.mjs} +1 -1
  125. package/dist/{managed-transforms-cmvRuRQ7.mjs → managed-transforms-BdwEjDxz.mjs} +1 -1
  126. package/dist/{matches-B0bzP6tB.mjs → matches-DMLDhZbo.mjs} +1 -1
  127. package/dist/{mcp-CSxoAB-y.mjs → mcp-Caedd-uE.mjs} +1 -1
  128. package/dist/{mesh-C-n2gi4F.mjs → mesh-jh4ALI5y.mjs} +1 -1
  129. package/dist/{migrate-CipwWhJE.mjs → migrate-BJ9Go_wP.mjs} +1 -1
  130. package/dist/{monetization-DHFiy5qs.mjs → monetization-CgujyJxp.mjs} +1 -1
  131. package/dist/{mtls-certificates-o11WJKM1.mjs → mtls-certificates-B5b1_uyW.mjs} +1 -1
  132. package/dist/{network-Ck6XHs9j.mjs → network-CC3P2gHc.mjs} +1 -1
  133. package/dist/{network-interconnects-CT4a_D5b.mjs → network-interconnects-DOJI5uxJ.mjs} +1 -1
  134. package/dist/{oauth-D6EZEBcY.mjs → oauth-BYkPua5f.mjs} +1 -1
  135. package/dist/{oauth-D9jA6L9a.mjs → oauth-DrAKiya8.mjs} +1 -1
  136. package/dist/{oauth-clients-DRBvDDNL.mjs → oauth-clients-DxU4Eo_n.mjs} +1 -1
  137. package/dist/{oauth-scopes-eV0VbNV-.mjs → oauth-scopes-CgWZFINf.mjs} +1 -1
  138. package/dist/{observability-CBCuWCen.mjs → observability-D0CSfZP3.mjs} +1 -1
  139. package/dist/{organization-3y27rtm7.mjs → organization-432YJF6t.mjs} +1 -1
  140. package/dist/{organizations-Q9QPbB-p.mjs → organizations-DDTdCDHF.mjs} +1 -1
  141. package/dist/{origin-ca-certificates-CbTgmQ2N.mjs → origin-ca-certificates-Ky57Fh6y.mjs} +1 -1
  142. package/dist/{origin-post-quantum-encryption-D5zeAJJ1.mjs → origin-post-quantum-encryption-OIFZe2l_.mjs} +1 -1
  143. package/dist/{origin-tls-client-auth-V5hB1Bwu.mjs → origin-tls-client-auth-BfbHQSxd.mjs} +1 -1
  144. package/dist/{page-rules-BYYBcKRU.mjs → page-rules-DPbQjYvh.mjs} +1 -1
  145. package/dist/{pages-CfinrrWX.mjs → pages-CPcDlbnc.mjs} +1 -1
  146. package/dist/{pay-per-crawl-C-S5WxQT.mjs → pay-per-crawl-AWBV8rpZ.mjs} +1 -1
  147. package/dist/{pay-per-use-B3gl7GQo.mjs → pay-per-use-C8ZCkTrQ.mjs} +1 -1
  148. package/dist/{pipelines-lfvTXng7.mjs → pipelines-BWGZv1kD.mjs} +2 -2
  149. package/dist/{precursor-CNm5rIPl.mjs → precursor-DX32b7mu.mjs} +1 -1
  150. package/dist/{previews-DV7OxoSM.mjs → previews-B6xfp2lU.mjs} +1 -1
  151. package/dist/{progress-BnIv4lh5.mjs → progress-BtNgm5yx.mjs} +1 -1
  152. package/dist/{prompt-DjRAo2Up.mjs → prompt-CbKaAX24.mjs} +1 -1
  153. package/dist/{queries-D0obyA9I.mjs → queries-z5ok-W9I.mjs} +1 -1
  154. package/dist/{queues-G1CS4M1H.mjs → queues-BcCod15K.mjs} +1 -1
  155. package/dist/{r2-BLXUGlGq.mjs → r2--_Gw1ru7.mjs} +1 -1
  156. package/dist/{radar-hGFsVuHs.mjs → radar-CJonQ35E.mjs} +1 -1
  157. package/dist/{raw-fetch-CuMHmrn0.mjs → raw-fetch-CAZrlsc6.mjs} +1 -1
  158. package/dist/{realtime-CZYwfmjr.mjs → realtime-4WdJ83cQ.mjs} +1 -1
  159. package/dist/{registrar-dvv2gU93.mjs → registrar-14yKfqak.mjs} +1 -1
  160. package/dist/{registrar-sandbox-Cnqn9BDJ.mjs → registrar-sandbox-D53qdGoh.mjs} +1 -1
  161. package/dist/{reporting-Bfwnpc7z.mjs → reporting-ZQmJVXcc.mjs} +1 -1
  162. package/dist/{request-headers-DaUqNccK.mjs → request-headers-B72_sA_G.mjs} +1 -1
  163. package/dist/{request-tracers-CF4_bzqx.mjs → request-tracers-DAKyy7Om.mjs} +1 -1
  164. package/dist/{resource-sharing-DaY7ISTQ.mjs → resource-sharing-BLsx1Nmo.mjs} +1 -1
  165. package/dist/{resource-tagging-D669i7sI.mjs → resource-tagging-B6EReDYx.mjs} +1 -1
  166. package/dist/{rules-C9w-8uyl.mjs → rules-CbCrIq7Y.mjs} +1 -1
  167. package/dist/{rulesets-yYRTXZ71.mjs → rulesets-CyCCWsk4.mjs} +1 -1
  168. package/dist/{rum-DPrqqYSC.mjs → rum-Cyl674km.mjs} +1 -1
  169. package/dist/{run-Duj1fsxa.mjs → run-BqAAX99Z.mjs} +1 -1
  170. package/dist/run-DZYLWyvE.mjs +2 -0
  171. package/dist/{schema-flags-CK4J4XhG.mjs → schema-flags-CpW8oSUF.mjs} +1 -1
  172. package/dist/{scim-DAZek91U.mjs → scim-Cw0LvYqJ.mjs} +1 -1
  173. package/dist/{sdk-DzVznUuv.mjs → sdk-BCzcRJCi.mjs} +1 -1
  174. package/dist/{secrets-store-COlaXNll.mjs → secrets-store-Bxn1jdZE.mjs} +1 -1
  175. package/dist/{security-insights-DF6ffEWO.mjs → security-insights-BgI7_mM3.mjs} +1 -1
  176. package/dist/{security-txt-D1nLEOCZ.mjs → security-txt-B2FOknxR.mjs} +1 -1
  177. package/dist/{shared-_YyZp2AY.mjs → shared-ZaIcKXbz.mjs} +1 -1
  178. package/dist/{smart-shield-CKSVq1sT.mjs → smart-shield-CjhSz9Ea.mjs} +1 -1
  179. package/dist/{snippets-D5zLR7Nj.mjs → snippets-CJiarnnh.mjs} +1 -1
  180. package/dist/{spawn-DiZTRMi2.mjs → spawn-B0Sl8lUu.mjs} +1 -1
  181. package/dist/{spectrum-L56rh44p.mjs → spectrum-BXIQwKUp.mjs} +1 -1
  182. package/dist/{speed-CfufTtTk.mjs → speed-B91sRfsz.mjs} +1 -1
  183. package/dist/{src-BIRFlqDR.mjs → src-DkO1fDN2.mjs} +5 -5
  184. package/dist/{ssl-BrDo1vL9.mjs → ssl-DDOj0RIi.mjs} +1 -1
  185. package/dist/{stream-1BpcnrhV.mjs → stream-BbvWFDAg.mjs} +1 -1
  186. package/dist/{submit-C-ICyQA7.mjs → submit-C11F-D4G.mjs} +1 -1
  187. package/dist/{tags-BA2CG06z.mjs → tags-CI_8DCQk.mjs} +1 -1
  188. package/dist/{telemetry-D14VqvDU.mjs → telemetry-C34WnJUm.mjs} +1 -1
  189. package/dist/telemetry-DNHEg6tE.mjs +2 -0
  190. package/dist/{tenant-DZ4dgD2t.mjs → tenant-Ddq-iTue.mjs} +1 -1
  191. package/dist/{tenant-custom-nameservers-YjOHEMtf.mjs → tenant-custom-nameservers-ClTjU8XP.mjs} +1 -1
  192. package/dist/{tunnels-l8YE_pie.mjs → tunnels-CMNU17n3.mjs} +1 -1
  193. package/dist/{turnstile-BQrUOlSx.mjs → turnstile-CR24j5Gf.mjs} +1 -1
  194. package/dist/update-check-CE0SmpBx.mjs +2 -0
  195. package/dist/{update-check-BPVQSvnH.mjs → update-check-DKJ_werM.mjs} +1 -1
  196. package/dist/update-check-worker.mjs +1 -1
  197. package/dist/{url-info-D2l_0t3y.mjs → url-info-Dz-CeD1r.mjs} +1 -1
  198. package/dist/{url-normalization-K8zAzorz.mjs → url-normalization-C695-pdG.mjs} +1 -1
  199. package/dist/{url-scanner-Dv7lSDeH.mjs → url-scanner-CtLWYlOL.mjs} +1 -1
  200. package/dist/{user-DleZBZED.mjs → user-BHgQmcY6.mjs} +1 -1
  201. package/dist/{values-BnpLZYLh.mjs → values-vERAUyO1.mjs} +1 -1
  202. package/dist/{vectorize-DyHeuA7K.mjs → vectorize-czzldF6P.mjs} +1 -1
  203. package/dist/version-Di2YJMgh.mjs +2 -0
  204. package/dist/{waiting-rooms-CKp_ty0T.mjs → waiting-rooms-CGk6Vjlo.mjs} +1 -1
  205. package/dist/{web-assets-XrKWHvN4.mjs → web-assets-C97qTerK.mjs} +1 -1
  206. package/dist/{web3-Bntbgx_4.mjs → web3-DuImSXsP.mjs} +1 -1
  207. package/dist/{workers-DM3cs8PN.mjs → workers-ClNKh7z_.mjs} +1 -1
  208. package/dist/{workers-builds-02i1psK2.mjs → workers-builds-DD_B-7Tt.mjs} +1 -1
  209. package/dist/{workers-for-platforms-B5RlZXZK.mjs → workers-for-platforms-KBtgR7F_.mjs} +1 -1
  210. package/dist/{workers-vpc-kjiAIRuT.mjs → workers-vpc-CsaJobJQ.mjs} +1 -1
  211. package/dist/{workflows-BkuFC47X.mjs → workflows-BbIvMUTv.mjs} +1 -1
  212. package/dist/{wrangler-migration-BDnS1puc.mjs → wrangler-migration-CJEb9hY3.mjs} +1 -1
  213. package/dist/{zaraz-BPOqw7RU.mjs → zaraz-D-hdVlz2.mjs} +1 -1
  214. package/dist/{zero-trust-B4sjDfre.mjs → zero-trust-DroiBnoL.mjs} +1 -1
  215. package/dist/{zone-DkaGQuB6.mjs → zone-CanTvmfK.mjs} +1 -1
  216. package/dist/{zones-DIlihhZN.mjs → zones-B3-NxJ-8.mjs} +1 -1
  217. package/package.json +1 -1
  218. package/dist/build-D5D56lvE.mjs +0 -2
  219. package/dist/discover-CcGReXr0.mjs +0 -2
  220. package/dist/error-sanitization-CSlapZbU.mjs +0 -2
  221. package/dist/generate-t4dFfFRV.mjs +0 -2
  222. package/dist/local-B5d4OPhA.mjs +0 -2
  223. package/dist/run-Dkcz54xY.mjs +0 -2
  224. package/dist/telemetry-Bn5lYtiy.mjs +0 -2
  225. package/dist/update-check-zLVAcGWy.mjs +0 -2
  226. package/dist/version-CH8K5y4G.mjs +0 -2
  227. /package/dist/{cloudflared-C4KjWoEY.mjs → cloudflared-DGuau-lC.mjs} +0 -0
  228. /package/dist/{command-WCtue6i1.mjs → command-TCklVvOY.mjs} +0 -0
  229. /package/dist/{discover-B_3A4a_t.mjs → discover-C5aiI6u0.mjs} +0 -0
  230. /package/dist/{generate-QUDsysBJ.mjs → generate-CLqGOlOx.mjs} +0 -0
  231. /package/dist/{live-a01OfPf9.mjs → live-MeJQXIei.mjs} +0 -0
  232. /package/dist/{r2-data-catalog-DpktRU5y.mjs → r2-data-catalog-2jQrdAdo.mjs} +0 -0
  233. /package/dist/{rate-limit-analytics-YsGha5pH.mjs → rate-limit-analytics-CU55zqCU.mjs} +0 -0
  234. /package/dist/{rate-limits-kH13NRdf.mjs → rate-limits-CZ-qHDPK.mjs} +0 -0
  235. /package/dist/{ready-DYun4Fpn.mjs → ready-BOpbZ1pN.mjs} +0 -0
  236. /package/dist/{recent-submissions-18NaOGOo.mjs → recent-submissions-KDqD2HyS.mjs} +0 -0
  237. /package/dist/{refute-BhMiJcE1.mjs → refute-DkF4XIMw.mjs} +0 -0
  238. /package/dist/{registry-DWTPK8_Q.mjs → registry-Cg5lP8oo.mjs} +0 -0
  239. /package/dist/{scan-logo-7y0pqFMk.mjs → scan-logo-DQkf6glG.mjs} +0 -0
  240. /package/dist/{scan-page-B6jnK3QI.mjs → scan-page-CMOJ_E0n.mjs} +0 -0
  241. /package/dist/{schema-JVvksQ1J.mjs → schema-GdBsV4P7.mjs} +0 -0
  242. /package/dist/{search-Rn3Eefv8.mjs → search-Bre1Zwn3.mjs} +0 -0
  243. /package/dist/{signed-url-Dzwy9Xiw.mjs → signed-url-24ZbX4yV.mjs} +0 -0
  244. /package/dist/{submission-info-SNhkDRRZ.mjs → submission-info-BmkbZVqM.mjs} +0 -0
  245. /package/dist/{tools-CFEubTr4.mjs → tools-BJZ0DDlL.mjs} +0 -0
  246. /package/dist/{total-queries-B20xslrH.mjs → total-queries-j8OAF_cE.mjs} +0 -0
  247. /package/dist/{tracked-domains-BCvIOZOK.mjs → tracked-domains-fe3EWYmF.mjs} +0 -0
  248. /package/dist/{verify-DOeBG4PL.mjs → verify-CKgZYvln.mjs} +0 -0
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./dotenv-CcQjGlV0.mjs";import{G as t,nt as n,q as r}from"./dist-BuCJ_55d.mjs";import{t as i}from"./context-M2Ho8pi3.mjs";import{m as a,u as o}from"./interactive-C-o16XQs.mjs";import{i as s}from"./auth-BjxUTZWb.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{n as l}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{D as u,S as d,b as f,c as p,d as m,g as h,n as g,u as _,v}from"./dist-CxGYQfpW.mjs";import{a as y,l as b,n as x,o as S,r as C,t as w}from"./containers-D9masRwv.mjs";import{a as T,i as E,n as D,o as O,r as k,s as A}from"./build-B-tN7mO-.mjs";import{t as j}from"./deploy-input-DJWWJs3a.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";function N(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,r,i,a,o)=>P(o.quiet,async()=>{let s=new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let n of r){let r=s.get(n.class_name);if(r||=(c??=await v(t,a),c.find(e=>e.class===n.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${n.class_name}".`);await p({imageRef:await F(n,e,i.id,a,t,o.localImageReferences?.get(n.class_name)),durable_object_namespace_id:r},n,t,a)}await _(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),n())})}}async function P(e,t){if(!e)return t();let n=o();a(`error`);try{return await t()}finally{a(n)}}async function F(e,t,r,i,a,o){if(o!==void 0)return d({pathToDocker:n(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return f(s,r,n(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function I(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,k)}function L(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function R(t){let n=t[`preview-name`],r=n??y();if(!r||!n&&r===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
2
+ import{r as e}from"./dotenv-CcQjGlV0.mjs";import{G as t,nt as n,q as r}from"./dist-BuCJ_55d.mjs";import{t as i}from"./context-Cibc7DIM.mjs";import{m as a,u as o}from"./interactive-C-o16XQs.mjs";import{i as s}from"./auth-C_-fMmUL.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{n as l}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{D as u,S as d,b as f,c as p,d as m,g as h,n as g,u as _,v}from"./dist-BOwFXRl5.mjs";import{a as y,l as b,n as x,o as S,r as C,t as w}from"./containers-CkVjC4WK.mjs";import{a as T,i as E,n as D,o as O,r as k,s as A}from"./build-B5UYMEQH.mjs";import{t as j}from"./deploy-input-DTjBGloL.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";function N(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,r,i,a,o)=>P(o.quiet,async()=>{let s=new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let n of r){let r=s.get(n.class_name);if(r||=(c??=await v(t,a),c.find(e=>e.class===n.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${n.class_name}".`);await p({imageRef:await F(n,e,i.id,a,t,o.localImageReferences?.get(n.class_name)),durable_object_namespace_id:r},n,t,a)}await _(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),n())})}}async function P(e,t){if(!e)return t();let n=o();a(`error`);try{return await t()}finally{a(n)}}async function F(e,t,r,i,a,o){if(o!==void 0)return d({pathToDocker:n(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return f(s,r,n(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function I(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,k)}function L(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function R(t){let n=t[`preview-name`],r=n??y();if(!r||!n&&r===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
3
3
 
4
4
  cf previews deploy PREVIEW_NAME`);return t.prebuilt||await D(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>z(t,r))}async function z(e,n){let a=await M(process.cwd());C(a.rootConfig),O(e.mode,a.rootConfig.buildContext.mode);let o=T(a.workers,e.worker),{wranglerConfig:c,builtConfig:l}=E(o,a.rootConfig),d=await s(),f=a.rootConfig.accountId??await i({isPreview:!0,skipProjectSettings:!0,complianceRegion:r(c)}),p=u(d);b({...p,logger:{...p.logger,log:()=>{},info:()=>{}}}),h({logger:{...p.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:p.fetchResult,fetchPagedListResult:p.fetchPagedListResult});let _=new Set(Object.values(l.exports??{}).filter(x).map(({container:e})=>e)),v=a.containers?.filter(({config:e})=>_.has(e.name))??[],y=w(v,c,{accountId:f}),D=y.source;if(D?.some(e=>e.scheduling_policy===`durable_object`))throw new A(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return D&&D.length>0&&m(f,d,t(c)),S(f,{name:n,json:!0},{workerConfig:l,rootConfig:a.rootConfig,containers:v.filter(({config:e})=>D?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:o.bundleDir?j(o,l):void 0,assets:o.assetsDir?{directory:o.assetsDir}:void 0},{...N(y),verifyContainersScope:async()=>{await g.listApplications()}})}const B={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:I,handler:async e=>{c(L(await R(e)),{quiet:e.quiet})}},V={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(l(B,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./args-CXgkQKK7.mjs";import{n}from"./version-CH8K5y4G.mjs";import{t as r}from"./session-CZTuHcbm.mjs";import{a as i}from"./dist-DW47TUGh.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!e()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(e,t){if(!c())return t();r(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(e);try{let n=await t();return o.clear(),a.stop(e),n}catch(t){throw o.clear(),a.error(e),t}}export{l as t};
2
+ import{t as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./args-CXgkQKK7.mjs";import{n}from"./version-Di2YJMgh.mjs";import{t as r}from"./session-CZTuHcbm.mjs";import{a as i}from"./dist-DW47TUGh.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!e()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(e,t){if(!c())return t();r(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(e);try{let n=await t();return o.clear(),a.stop(e),n}catch(t){throw o.clear(),a.error(e),t}}export{l as t};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{n}from"./version-CH8K5y4G.mjs";import{t as r}from"./session-CZTuHcbm.mjs";import{M as i,n as a}from"./interactive-C-o16XQs.mjs";import{i as o,o as s,r as c,t as l}from"./dist-DW47TUGh.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){r(n)}async function f(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{n}from"./version-Di2YJMgh.mjs";import{t as r}from"./session-CZTuHcbm.mjs";import{M as i,n as a}from"./interactive-C-o16XQs.mjs";import{i as o,o as s,r as c,t as l}from"./dist-DW47TUGh.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){r(n)}async function f(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
3
3
  `)?t.slice(0,-1):t}async function p(e,n,r){let o=r?.kind??`text`;if(a()){if(o===`secret`){let t=await f();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let l=`Enter value for --${e}`,u=n||r?.question||l,p=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;d();let m=o===`secret`?await c({message:u,mask:`•`,validate:p}):await s({message:u,validate:p});if(i(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function m(e,n,r,s={}){let c=u(e),l=r.map(u);if(a())throw Error(`--${c} is required (one of: ${l.join(`, `)}). Pass --${c} <value> or run interactively.`);let f=`Select value for --${c}`,p=u(n||f);d();let m=await o({message:p,options:r.map(e=>({value:e,label:u((Object.hasOwn(s,e)?s[e]:void 0)??e)}))});if(i(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function h(e,n){if(a())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);d();let r=await l({message:n||`Confirm --${e}`,initialValue:!1});if(i(r))throw new t(130,{cancelled:!0});return r===!0}async function g(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(a())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;d();let o=await l({message:e,initialValue:n});if(i(o))throw new t(130,{cancelled:!0});return o===!0}async function _(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(a())return process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\n`),!1;d();let o=await l({message:r,initialValue:!1});if(i(o))throw new t(130,{cancelled:!0});return o===!0}export{p as a,m as i,_ as n,u as o,h as r,g as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-DjRAo2Up.mjs";function p(e){return e.usage(`$0 queries bulk create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-CbKaAX24.mjs";function p(e){return e.usage(`$0 queries bulk create
3
3
 
4
4
  Return a success message after creating new saved string queries in bulk`).option(`queries`,{type:`string`,description:`The queries 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:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create new saved string queries in bulk`,builder:p,handler:async d=>s({command:`queries bulk create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queries bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/queries/bulk`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({queries:l(d.queries,`queries`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queries.bulk.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({queries:l(d.queries,`queries`)});i(await o(`Creating`,async()=>s.queries.bulk.create({...p,account_id:f})),{successLabel:`Created`})})},h={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 queries create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 queues consumers create <queue-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-CbKaAX24.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 queues consumers create <queue-id>
3
3
 
4
4
  Creates a consumer for a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dead-letter-queue`,{type:`string`,description:`The dead_letter_queue field`}).option(`script-name`,{type:`string`,description:`Name of a Worker`}).option(`settings-batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).option(`settings-max-concurrency`,{type:`number`,description:"Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended)."}).option(`settings-max-retries`,{type:`number`,description:`The maximum number of retries`}).option(`settings-max-wait-time-ms`,{type:`number`,description:`The number of milliseconds to wait for a batch to fill up before attempting to deliver it`}).option(`settings-retry-delay`,{type:`number`,description:`The number of seconds to delay before making the message available for another attempt.`}).option(`settings-visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`worker`,`http_pull`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a consumer`}).conflicts(`script-name`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-concurrency`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-wait-time-ms`,[`settings-visibility-timeout-ms`]).conflicts(`settings-visibility-timeout-ms`,[`script-name`,`settings-max-concurrency`,`settings-max-wait-time-ms`])}const g={command:`create <queue-id>`,describe:`Create a Queue Consumer`,builder:ee,handler:async l=>s({command:`queues consumers create`,classification:{safeFlags:[`type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues consumers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await n();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.consumers.create({body:e,account_id:m,queue_id:l[`queue-id`]})),{successLabel:`Created`});return}l.type===void 0&&(l.type=await p(`type`,`The type field`,[`worker`,`http_pull`])),l.type===`worker`&&l[`script-name`]===void 0&&(l[`script-name`]=await f(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)});i(await o(`Creating`,async()=>s.queues.consumers.create({body:h,account_id:m,queue_id:l[`queue-id`]})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 queues consumers delete <consumer-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-DjRAo2Up.mjs";import{n as ee,t as te}from"./raw-fetch-CuMHmrn0.mjs";function v(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{a as r,r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-CbKaAX24.mjs";import{n as ee,t as te}from"./raw-fetch-CAZrlsc6.mjs";function v(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
3
3
 
4
4
  Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:v,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await _({force:!!l.force,message:`This removes the R2 bucket's CORS policy. Browser requests that depend on these cross-origin permissions may fail.`})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-BjxUTZWb.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-BnIv4lh5.mjs";import{t as i}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{t as s}from"./cli-types-DoVT5q_M.mjs";import{n as c,t as l}from"./raw-fetch-CuMHmrn0.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
2
+ import{r as e}from"./auth-C_-fMmUL.mjs";import{t}from"./output-CvQFJkvi.mjs";import{t as n}from"./dry-run-Bq0JAsbX.mjs";import{t as r}from"./progress-BtNgm5yx.mjs";import{t as i}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as a,t as o}from"./body-parser-hh2avzkz.mjs";import{t as s}from"./cli-types-DoVT5q_M.mjs";import{n as c,t as l}from"./raw-fetch-CAZrlsc6.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
3
3
 
4
4
  Returns a summary of AI agent readiness scores across scanned domains, grouped by the specified dimension. Data is sourced from weekly bulk scans. All values are raw domain counts.`).positional(`dimension`,{type:`string`,description:`Specifies the agent readiness data dimension by which to group the results.`,demandOption:!0}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`summary <dimension>`,describe:`Get agent readiness summary`,builder:s(ee),handler:async a=>i({command:`radar agent-readiness summary`,classification:{safeFlags:[`format`,`dry-run`]}},a,async()=>{let i={date:a.date,domainCategory:a[`domain-category`],name:a.name,format:a.format};if(a.dryRun){n({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${a.dimension==null?`<dimension>`:encodeURIComponent(String(a.dimension))}`,pathParams:{dimension:String(a.dimension??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:a.dimension,...i})),{successLabel:`Loaded`})})},u={command:`agent-readiness`,describe:`Agent readiness summary statistics across the Cloudflare network`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 radar ai bots timeseries-groups <dimension>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./sdk-DzVznUuv.mjs";import{G as t}from"./dist-BuCJ_55d.mjs";import{r as n}from"./local-CQc36Viv.mjs";import{n as r}from"./context-M2Ho8pi3.mjs";import{n as i}from"./request-headers-DaUqNccK.mjs";import{i as a,t as o}from"./auth-BjxUTZWb.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
2
+ import{r as e}from"./sdk-BCzcRJCi.mjs";import{G as t}from"./dist-BuCJ_55d.mjs";import{r as n}from"./local-B5oRPTEN.mjs";import{n as r}from"./context-Cibc7DIM.mjs";import{n as i}from"./request-headers-B72_sA_G.mjs";import{i as a,t as o}from"./auth-C_-fMmUL.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-CbKaAX24.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
3
3
 
4
4
  Returns day-wise livestream analytics for the specified time range.`).positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Fetch day-wise analytics data for your livestreams`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},te={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 realtime kit analytics livestreams get <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-CQc36Viv.mjs";import{a as r,t as i}from"./context-M2Ho8pi3.mjs";import{a,o,r as s}from"./auth-BjxUTZWb.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-BnIv4lh5.mjs";import{n as d,t as f}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-hh2avzkz.mjs";import{n as _}from"./input-validation-Dk52b0me.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-DjRAo2Up.mjs";import{t as S}from"./cli-types-DoVT5q_M.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags-CK4J4XhG.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-B5oRPTEN.mjs";import{a as r,t as i}from"./context-Cibc7DIM.mjs";import{a,o,r as s}from"./auth-C_-fMmUL.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-BtNgm5yx.mjs";import{n as d,t as f}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-hh2avzkz.mjs";import{n as _}from"./input-validation-Dk52b0me.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-CbKaAX24.mjs";import{t as S}from"./cli-types-DoVT5q_M.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags-CpW8oSUF.mjs";import{domainToASCII as ie}from"node:url";import{isDeepStrictEqual as ae}from"node:util";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await i();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
3
  Pass this value to fetch the next page of results. Omit (or
4
4
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List extensions`,builder:S(ce),handler:async e=>f({command:`registrar extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await i();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})})},ue={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function P(e,t,n){let r=b(n),i=ie(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,domains:[n]})),o=i===``?[]:a.domains.filter(e=>e.name.toLowerCase()===i),s=o.length===1?o[0]:void 0;if(!s)throw Error(`The availability check returned no result for ${r}, so cf cannot safely register it.`);if(s.registrable!==!0&&s.reason===`domain_premium`)throw Error(`${r} is a premium domain (domain_premium). Premium registration is not supported by this API, so cf will not submit it.`);if(s.registrable!==!0){let e=s.reason===void 0?``:` (${b(s.reason)})`;throw Error(`${r} is not available for registration${e}.`)}if(s.tier===`premium`)throw Error(`${r} is a premium domain. Premium registration is not supported by this API, so cf will not submit it.`);if(s.tier!==`standard`)throw Error(`${r} is not confirmed as a standard domain. This API only supports standard registrations, so cf will not submit it.`);if(!s.pricing)throw Error(`The availability check returned no pricing for ${r}, so cf cannot safely register it.`);return s.pricing}const F=`registrar-extension-schema`;function de(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function fe(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({account_id:t,extension:e},{timeoutInSeconds:r/1e3,maxRetries:0})}catch(e){return{ok:!1,reason:A(e)}}let a=O(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function I(e,t,n,r,i){let a=t?[t]:de(e);if(a.length===0)return{ok:!1,reason:`'${e}' has no extension — pass a fully qualified domain name`};let o,s=`not found`;for(let e of a){let t=D(F,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:A(e)}}let a;if(i!==void 0&&(a=i-Date.now(),a<=0))return{ok:!1,reason:`the request timed out`};let c=await fe(e,n,o,a);if(c.ok)return C(F,[n,e],c.schema),c;if(s=c.reason,!/not found/i.test(c.reason))return c}return{ok:!1,reason:a.length>1?`no registration schema for ${a.map(e=>`.${e}`).join(` or `)} (${s})`:s}}const pe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),me={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function L(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function he(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function R(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function z(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function ge(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=z(n,e),i=R(t),a=L(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&E(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function _e(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:L(me,n)??he(n)).join(` · `)}function B(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&pe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...B(a,t,e));continue}let o=z(t,e);r.push([_e(e,o),ge(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function V(e,t,n){if(Object.hasOwn(e,n))return R(e[n]);let r=ve(t,n);return r===void 0?`API default`:`${R(r)} (default)`}function H(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(H)]}function U(e,t){return e===void 0?[]:[...H(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>U(e,t))]}function ve(e,t){let n=U(e,t),r=n[0];return n.length>0&&n.every(e=>ae(e,r))?r:void 0}function W(t){let n=t.map(([e,t])=>[b(e),b(t)]),r=Math.min(32,Math.max(...n.map(([e])=>e.length),0));return n.map(([t,n])=>`│ ${e.muted(t.padEnd(r))} ${e.bold(n)}`)}function ye(t){let n=[[`Domain`,t.domain],[`Account`,t.accountId],[`Registration term`,`${t.years} ${t.years===1?`year`:`years`}`],[`Due now`,t.quotedCost],[`Renewal price`,`${t.pricing.currency} ${t.pricing.renewal_cost} per year`],[`Auto-renew`,V(t.body,t.schema,`auto_renew`)],[`Privacy mode`,V(t.body,t.schema,`privacy_mode`)]],r=B(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...W(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...W(r)]:[],`│`].join(`
5
5
  `)}const G=[`domain_name`],K=`Fully qualified domain name to register, e.g. example.travel`,q=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function be(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function xe(e,t,n){return t.some(t=>{if(t.path[0]!==e||t.path.length===1)return!1;let r=t.name.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());return Object.hasOwn(n,t.name)&&n[t.name]!==void 0||Object.hasOwn(n,r)&&n[r]!==void 0})}function Se(e){if(e.choices===void 0)return;let t=(e.schema.enum??(e.schema.oneOf??e.schema.anyOf)?.flatMap(e=>e.const===void 0?e.enum??[]:[e.const]))?.filter(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`);return t?.length===e.choices.length?t:void 0}function Ce(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:b(n);return{path:be(e.path),flag:`--${e.name}`,question:te(e),description:r,choices:Se(e)?.map(t=>{let n=String(t);return{value:t,label:b(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function we(e,t,n,r,i){let a=w(n,r);return a.length===0?!1:(c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(Ce),validationErrors:i}),!0)}function Te(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function Ee(e,t){let n=Te(e.registration_cost),r=Te(e.renewal_cost);if(!n||!r)return;let i=Math.max(n.scale,r.scale),a=e=>10n**BigInt(e),o=n.units*a(i-n.scale)+r.units*a(i-r.scale)*BigInt(t-1);if(i===0)return o.toString();let s=a(i);return`${o/s}.${(o%s).toString().padStart(i,`0`)}`}function De(e,t){let n=Ee(e,t);if(!n||!/^[A-Z]{3}$/.test(e.currency))throw Error(`The availability check returned invalid pricing, so cf cannot safely confirm this registration.`);return`${e.currency} ${n}`}function J(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function Y(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&N(e.if)&&E(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=Y(a,t,n,r,i);e.found&&(o=!0,s=J(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(N)?a.filter(e=>je(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>Y(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=J(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function X(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>X(e,t))]}function Z(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function Oe(e){let t=[...typeof e.minimum==`number`?[e.exclusiveMinimum===!0?Math.floor(e.minimum)+1:Math.ceil(e.minimum)]:[],...typeof e.exclusiveMinimum==`number`?[Math.floor(e.exclusiveMinimum)+1]:[],...(e.allOf??[]).flatMap(e=>{let t=Oe(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function ke(e){let t=X(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=X(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=Oe(e);return r===void 0?{found:!1}:{found:!0,value:r}}function Q(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=J(a,Q(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=J(a,e.flatMap(e=>Q(e).map(e=>[e]))));return a.map(Z)}function Ae(e){return e.flatMap(e=>Q(e).map(t=>({schema:e,candidate:ke(t)})))}function je(e,t,n,r){let i=E(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>E(e,{...n,[t]:r}).length===0)}function Me(e,t){let n=Object.hasOwn(e,`years`),r=Y(t,`years`,e,!1);if(!r.found)throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let i=r.bundles.map(Z),a=Y(t,`years`,e,!0,n?[]:Ae(i).flatMap(({schema:e,candidate:t})=>t.found&&E(e,t.value).length===0?[t.value]:[]));if(!a.found||n&&a.bundles.some(e=>e.length===0))throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let o=a.bundles.map(Z),s=o,c,l;if(n)l=e.years;else{let n=Ae(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=E(e,t.value);return n===void 0?!0:(c??=n,!1)});if(N(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&E(t,{...e,years:n.value}).length===0);i.length>0&&(n=[...r,...i])}s=n.map(({schema:e})=>e);let r=n.map(({candidate:e})=>e),[i]=r;l=i?.found===!0&&r.every(e=>e.found&&Object.is(e.value,i.value))?i.value:void 0}if(typeof l!=`number`||!Number.isInteger(l)||l<=0)throw!n&&s.length===0&&c?Error(`The extension schema returned an invalid default registration term: ${c}`):Error(n?`The requested registration term must be a positive whole number of years.`:`The extension schema returned no safe default registration term, so cf cannot safely confirm this registration.`);let u=n?E(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>E(e,l));if(u.length>0)throw Error(n?`The requested registration term is invalid: ${u[0]}`:`The extension schema returned an invalid default registration term: ${u[0]}`);return e.years=l,l}let Ne;function $(e){let t=_(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function Pe(e){return Ne=e,e.positional(`domain-name`,{type:`string`,description:`Fully qualified domain name, e.g. example.travel`}).option(`extension`,{type:`string`,description:`Extension whose registration schema to use (default: derived from the domain)`}).option(`prefer`,{type:`string`,description:"Set the Prefer header, e.g. `respond-async` to skip the synchronous wait"}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip the registration confirmation prompt`,default:!1}).option(`contacts`,{type:`string`,description:`Registrant contacts as inline JSON or @path to a reusable JSON file`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this extension's input flags`}).epilogue("Input flags depend on the extension: run `cf registrar registrations create <domain> --help`.\ncf rechecks availability and pricing before confirmation. Run `cf registrar registrations check --domains <domain>` to inspect them separately.")}async function Fe(t){Ne?.showHelp(`log`);let n=$(t[`domain-name`]);if(!n)return;let r=b(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the registration fields for ${r}.`)}`);return}let c=await I(n,t.extension,a,()=>s(t),i);console.log(c.ok?`\n${j(T(c.schema,{exclude:[G]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${b(c.reason)}.`)}`)}async function Ie(e,t,n){for(;;){let r=k(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=te(e);if(e.type===`boolean`&&e.schema.const===!0){let r=b(e.schema.description??n);if(!await x(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await y(e.name,r,e.choices,e.choiceLabels):t[e.name]=await v(e.name,r,{validate:t=>re(e,t)})}}}function Le(e){let t=m(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Re(e){let t;if(e.startsWith(`@`))t=_(e,`contacts`,`json`);else try{t=JSON.parse(e)}catch{throw Error(`--contacts must contain a JSON object or @path to a JSON file`)}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--contacts must contain a JSON object or @path to a JSON file`);return t}var ze=d({command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:Pe,handler:async e=>{if(e.help){await Fe(e);return}if(e.local)throw Error(t);let n={};e.prefer!==void 0&&(n.Prefer=String(e.prefer));let o;if(e.body!==void 0){let t=ne([],e,{reserved:q}).errors.some(e=>e.startsWith(`Unknown flag`));if(e.contacts!==void 0||t)throw Error(`--body cannot be combined with registration field flags. Pass one or the other.`);o=Le(e.body)}let d=e.contacts===void 0?void 0:Re(e.contacts),f=$(e[`domain-name`]),p=o?.domain_name;if(p!==void 0&&typeof p!=`string`)throw Error(`--body field domain_name must be a string`);if(f!==void 0&&p!==void 0&&f!==p)throw Error(`The positional domain '${b(f)}' does not match --body domain_name '${b(p)}'`);let m=f??p;if(!m){if(o!==void 0){c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. A domain is required to determine the registration schema.`,missingFields:[{path:`/domain_name`,flag:`--domain-name`,question:K}],validationErrors:["`/domain_name` is required"]});return}m=await v(`domain-name`,K)}let h=b(m);o&&(o.domain_name=m);let g=e.dryRun?await r()??`<account-id>`:await i(),_,y=async()=>(_||=await s(e),_);e.dryRun||await P(await y(),g,m);let x=await I(m,e.extension,g,y);if(!x.ok)throw Error(`Could not load the registration schema for ${h}: ${b(x.reason)}.`);let S=b(x.extension),C=x.schema,w=T(x.schema,{exclude:[G]});if(!o){if(d!==void 0&&xe(`contacts`,w,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=d===void 0?void 0:{contacts:d};if(n!==void 0&&delete t.contacts,!await Ie(w,t,n))return;let r=ne(w,t,{reserved:q,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p}from"./prompt-DjRAo2Up.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage("$0 registrar-sandbox extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <extension>`,describe:`Get extension`,builder:h,handler:async r=>c({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/registrar-sandbox/extensions/${r.extension==null?`<extension>`:encodeURIComponent(String(r.extension))}`,pathParams:{extension:String(r.extension??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.extensions.get({account_id:l,extension:r.extension})),{successLabel:`Loaded`})})};function _(e){return e.usage("$0 registrar-sandbox extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{a as r,r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p}from"./prompt-CbKaAX24.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage("$0 registrar-sandbox extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <extension>`,describe:`Get extension`,builder:h,handler:async r=>c({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/registrar-sandbox/extensions/${r.extension==null?`<extension>`:encodeURIComponent(String(r.extension))}`,pathParams:{extension:String(r.extension??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.extensions.get({account_id:l,extension:r.extension})),{successLabel:`Loaded`})})};function _(e){return e.usage("$0 registrar-sandbox extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
3
  Pass this value to fetch the next page of results. Omit (or
4
4
  pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List extensions`,builder:m(_),handler:async r=>c({command:`registrar-sandbox extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},r,async()=>{let c={name:r.name,cursor:r.cursor,per_page:r[`per-page`],direction:r.direction,sort_by:r[`sort-by`]};if(r.dryRun){o({command:`cf registrar-sandbox extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/registrar-sandbox/extensions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.registrarSandbox.extensions.list({account_id:u,...c})),{successLabel:`Loaded`})})},y={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage("$0 registrar-sandbox registrations check <domains...>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,array:!0,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const x={command:`check <domains...>`,describe:`Check domain availability`,builder:b,handler:async r=>c({command:`registrar-sandbox registrations check`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/registrar-sandbox/domain-check`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({domains:r.domains}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...e,account_id:l})),{successLabel:`Created`});return}let f=d({domains:r.domains});a(await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...f,account_id:l})),{successLabel:`Created`})})};function S(e){return e.usage("$0 registrar-sandbox registrations create\n\nStarts a domain registration workflow. ### Prerequisites - The account must not already be at the maximum supported domain limit. A single account may own up to 500 domains in total across registrations created through either the dashboard or this API. - The domain must be on a supported extension for programmatic registration. - Use `POST /domain-check` immediately before calling this endpoint to confirm real-time availability and pricing. ### Defaults - `years`: defaults to the extension's minimum registration period (1 year for most extensions, but varies — for example, `.ai` (if supported) requires a minimum of 2 years). - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the registration. Renewal pricing may change over time based on registry pricing. - `privacy_mode`: defaults to `redaction`. ### Premium domains Premium domain registration is not currently supported by this API. If `POST /domain-check` returns `tier: premium`, do not call this endpoint for that domain. ### Response behavior By default, the server holds the connection for a bounded, server-defined amount of time while the registration completes. Most registrations finish within this window and return `201 Created` with a completed workflow status. If the registration is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`.").option(`prefer`,{type:`string`,description:`Set to \`respond-async\` to receive an immediate \`202 Accepted\` without
5
5
  waiting for the operation to complete (RFC 7240).
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c}from"./body-parser-hh2avzkz.mjs";function l(e){return e.usage(`$0 reporting industry get
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c}from"./body-parser-hh2avzkz.mjs";function l(e){return e.usage(`$0 reporting industry get
3
3
 
4
4
  Gets the industry classification for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get an account industry`,builder:l,handler:async c=>s({command:`reporting industry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting industry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.industry.get({account_id:l})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 reporting industry update
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./agent-context-GRiQ4zRU.mjs";import{t}from"./version-CH8K5y4G.mjs";import{i as n,t as r}from"./interactive-C-o16XQs.mjs";function i(){return r?`ci`:n()?`interactive`:`non-interactive`}function a(){let n=e(),r=n.isAgentic&&n.harness!==null?{"X-CF-CLI-Agent":n.harness.id}:{};return{"User-Agent":t,"X-CF-CLI-Mode":i(),...r}}export{a as n,i as t};
2
+ import{t as e}from"./agent-context-GRiQ4zRU.mjs";import{t}from"./version-Di2YJMgh.mjs";import{i as n,t as r}from"./interactive-C-o16XQs.mjs";function i(){return r?`ci`:n()?`interactive`:`non-interactive`}function a(){let n=e(),r=n.isAgentic&&n.harness!==null?{"X-CF-CLI-Agent":n.harness.id}:{};return{"User-Agent":t,"X-CF-CLI-Mode":i(),...r}}export{a as n,i as t};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d}from"./prompt-DjRAo2Up.mjs";function f(e){return e.usage(`$0 request-tracers traces create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d}from"./prompt-CbKaAX24.mjs";function f(e){return e.usage(`$0 request-tracers traces create
3
3
 
4
4
  Traces a simulated HTTP request through Cloudflare's edge to analyze how rules, settings, and configurations would process the request. Useful for debugging firewall rules, page rules, and other request transformations without sending actual traffic. Supports custom headers, cookies, body content, and geolocation context.`).option(`body-base64`,{type:`string`,description:`Base64 encoded request body`}).option(`body-plain-text`,{type:`string`,description:`Request body as plain text`}).option(`context-bot-score`,{type:`number`,description:`Bot score used for evaluating tracing request processing`}).option(`context-geoloc-city`,{type:`string`,description:`The context.geoloc.city field`}).option(`context-geoloc-continent`,{type:`string`,description:`The context.geoloc.continent field`}).option(`context-geoloc-is-eu-country`,{type:`boolean`,description:`The context.geoloc.is_eu_country field`}).option(`context-geoloc-iso-code`,{type:`string`,description:`The context.geoloc.iso_code field`}).option(`context-geoloc-latitude`,{type:`number`,description:`The context.geoloc.latitude field`}).option(`context-geoloc-longitude`,{type:`number`,description:`The context.geoloc.longitude field`}).option(`context-geoloc-postal-code`,{type:`string`,description:`The context.geoloc.postal_code field`}).option(`context-geoloc-region-code`,{type:`string`,description:`The context.geoloc.region_code field`}).option(`context-geoloc-subdivision-2-iso-code`,{type:`string`,description:`The context.geoloc.subdivision_2_iso_code field`}).option(`context-geoloc-timezone`,{type:`string`,description:`The context.geoloc.timezone field`}).option(`context-skip-challenge`,{type:`boolean`,description:`Whether to skip any challenges for tracing request (e.g.: captcha)`}).option(`context-threat-score`,{type:`number`,description:`Threat score used for evaluating tracing request processing`}).option(`method`,{type:`string`,description:`HTTP Method of tracing request`}).option(`protocol`,{type:`string`,description:`HTTP Protocol of tracing request`}).option(`skip-response`,{type:`boolean`,description:`Skip sending the request to the Origin server after all rules evaluation`}).option(`url`,{type:`string`,description:`URL to which perform tracing request`}).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 p={command:`create`,describe:`Request Trace`,builder:f,handler:async f=>s({command:`request-tracers traces create`,classification:{safeFlags:[`context-geoloc-is-eu-country`,`context-skip-challenge`,`skip-response`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf request-tracers traces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/request-tracer/trace`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.requestTracers.traces.create({...e,account_id:p})),{successLabel:`Created`});return}f.method===void 0&&(f.method=await d(`method`,`HTTP Method of tracing request`)),f.url===void 0&&(f.url=await d(`url`,`URL to which perform tracing request`));let m=l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)});i(await o(`Creating`,async()=>s.requestTracers.traces.create({...m,account_id:p})),{successLabel:`Created`})})},m={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-DjRAo2Up.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 resource-sharing create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-CbKaAX24.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 resource-sharing create
3
3
 
4
4
  Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`).option(`name`,{type:`string`,description:`The name of the share.`}).option(`recipients`,{type:`string`,description:`The recipients field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`resources`,{type:`string`,description:`The resources 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:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create a new share`,builder:g,handler:async p=>s({command:`resource-sharing create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.resourceSharing.create({...e,account_id:m})),{successLabel:`Created`});return}if(p.name===void 0&&(p.name=await f(`name`,`The name of the share.`)),p.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);if(p.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let h=u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)});i(await o(`Creating`,async()=>s.resourceSharing.create({...h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 resource-sharing delete <share-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";function c(e){return e.usage(`$0 resource-tagging summary get
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";function c(e){return e.usage(`$0 resource-tagging summary get
3
3
 
4
4
  Lists all distinct tag keys and their distinct values across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`List tag key summary`,builder:c,handler:async c=>s({command:`resource-tagging summary get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf resource-tagging summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/tags/summary`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.resourceTagging.summary.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},d={command:`resource-tagging`,describe:`resource-tagging`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-DjRAo2Up.mjs";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]})),{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-CbKaAX24.mjs";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]})),{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
3
3
 
4
4
  Creates a new list of the specified kind.`).option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`name`,{type:`string`,description:`An informative name for the list. Use this name in filter and rule expressions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a list`,builder:_,handler:async l=>s({command:`rules lists create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rules.lists.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`An informative name for the list. Use this name in filter and rule expressions.`));let m=u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.rules.lists.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 rules lists delete <list-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,i as n,t as r}from"./context-M2Ho8pi3.mjs";import{r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{n as p}from"./prompt-DjRAo2Up.mjs";function m(e){return e.usage(`$0 rulesets account-rulesets create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-Cibc7DIM.mjs";import{r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{n as p}from"./prompt-CbKaAX24.mjs";function m(e){return e.usage(`$0 rulesets account-rulesets create
3
3
 
4
4
  Creates a ruleset.`).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`,default:``}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create an account or zone ruleset`,builder:m,handler:async p=>c({command:`rulesets account-rulesets create`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await i(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await n({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await r();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>m.rulesets.accountRulesets.create({...e,account_or_zone:h,account_or_zone_id:g,...c})),{successLabel:`Created`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>m.rulesets.accountRulesets.create({..._,account_or_zone:h,account_or_zone_id:g,...c})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 rulesets account-rulesets delete <ruleset-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{r}from"./auth-BjxUTZWb.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BnIv4lh5.mjs";import{t as s}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-DjRAo2Up.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 rum rules bulk-create
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{r}from"./auth-C_-fMmUL.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-BtNgm5yx.mjs";import{t as s}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-CbKaAX24.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 rum rules bulk-create
3
3
 
4
4
  Modifies one or more rules in a Web Analytics ruleset with a single request.`).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`delete-rules`,{type:`string`,array:!0,description:`A list of rule identifiers to delete.`}).option(`rules`,{type:`string`,description:`A list of rules to create or update. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`bulk-create`,describe:`Update Web Analytics rules`,builder:m,handler:async d=>s({command:`rum rules bulk-create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf rum rules bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/v2/${d[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(d[`ruleset-id`]))}/rules`,pathParams:{"ruleset-id":String(d[`ruleset-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({delete_rules:d[`delete-rules`],rules:l(d.rules,`rules`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.rum.rules.bulkCreate({...e,account_id:f,ruleset_id:d[`ruleset-id`]})),{successLabel:`Created`});return}let p=u({delete_rules:d[`delete-rules`],rules:l(d.rules,`rules`)});i(await o(`Creating`,async()=>s.rum.rules.bulkCreate({...p,account_id:f,ruleset_id:d[`ruleset-id`]})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 rum rules create <ruleset-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./agent-context-GRiQ4zRU.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{Q as n}from"./dist-BuCJ_55d.mjs";import{n as r}from"./version-CH8K5y4G.mjs";import{t as i}from"./delegate-B6LetRpZ.mjs";import{i as a,r as o}from"./lifecycle-C7tAC1Mn.mjs";import{i as s,t as c}from"./interactive-C-o16XQs.mjs";import{t as l}from"./request-headers-DaUqNccK.mjs";import{n as u,t as d}from"./state-BaGRaYow.mjs";import{t as f}from"./error-sanitization-BXqhvJsR.mjs";import p from"node:os";import{createHash as m,randomUUID as h}from"node:crypto";const g=new Date(`2026-01-01T00:00:00.000Z`),_=`CF_SEND_TELEMETRY`,v=`WRANGLER_SEND_METRICS`,y=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function b(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function x(){let e=b(process.env[_]);if(e!==void 0)return{enabled:e,source:`env`};let t=b(process.env[v]);if(t!==void 0)return{enabled:t,source:`wrangler-env`}}function S(){return x()?.enabled}function C(){let e=d();if(typeof e.deviceId==`string`&&y.test(e.deviceId))return e.deviceId;let t=h();return u({deviceId:t}),t}function w(){return d().deviceId===void 0}function T(){if(n())return{enabled:!1,source:`do-not-track`};let e=x();if(e!==void 0)return e;let t=d().telemetry?.preference;return t?.enabled===!1?{enabled:!1,source:`config`}:t?.enabled===!0&&typeof t.date==`string`&&new Date(t.date)>=g?{enabled:!0,source:`config`}:{enabled:!0,source:`default`}}function E(e){switch(e){case`do-not-track`:return`DO_NOT_TRACK`;case`env`:return _;case`wrangler-env`:return v;default:return}}function D(e){u({telemetry:{preference:{enabled:e,date:new Date().toISOString()}}})}function O(){return d().telemetry?.bannerLastShown}function k(e){u({telemetry:{bannerLastShown:e}})}function A(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function j(){return p.version()}function M(){return process.arch}function N(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function P(){let e=process.env.npm_config_user_agent??``;return e.startsWith(`pnpm`)?`pnpm`:e.startsWith(`yarn`)?`yarn`:e.startsWith(`bun`)?`bun`:e.startsWith(`npm`)?`npm`:`unknown`}function F(e,t,n){return m(`sha256`).update(`cf-agent-session-v1\0`).update(e).update(`\0`).update(t).update(`\0`).update(n).digest(`hex`).slice(0,32)}function I(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let L;function R(){if(L)return L;let[t,n,o]=r.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),u=Date.now(),d=0,f=w(),{enabled:p}=T(),m=e(),h=m.harness?.id??null,g=m.matches.find(e=>e.sessionId);function _(){let e=I(),a=C();return{product:`cf`,cliVersion:r,cliMajor:t??0,cliMinor:n??0,cliPatch:o??0,...e?{prereleaseLabel:e}:{},osPlatform:A(),osVersion:j(),arch:M(),nodeVersion:N(),packageManager:P(),deviceId:a,amplitude_session_id:u,amplitude_event_id:d++,...g?.sessionId?{agentSessionKey:F(a,g.harness.id,g.sessionId)}:{},isFirstUsage:f,isCI:c,isInteractive:s(),cliMode:l(),agent:h,delegated:!!process.env[i]}}function v(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};if(process.env.DEBUG&&console.error(`Telemetry ${p?`sending`:`would send`}: ${JSON.stringify(n)}`),p)return fetch(`https://sparrow.cloudflare.com/api/v1/event`,{method:`POST`,signal:AbortSignal.timeout(1e3),headers:{Accept:`*/*`,"Content-Type":`application/json`,"Sparrow-Source-Key":`50598e014ed44c739ec8074fdc16057c`},mode:`cors`,keepalive:!0,body:JSON.stringify(n)}).then(()=>void 0).catch(e=>{process.env.DEBUG&&console.error(`Telemetry failed to send:`,e instanceof Error?e.message:String(e))})}return L={enabled:p,sendCommandEvent(e,t){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},L}const z={q:{canonical:`quiet`,type:`boolean`},z:{canonical:`zone`,type:`value`},m:{canonical:`mode`,type:`value`},h:{canonical:`help`,type:`boolean`},v:{canonical:`version`,type:`boolean`}};function B(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function V(e,t){let n=[];for(let r of e){if(r===`--`)break;if(r.startsWith(`--`)){let e=r.slice(2).split(`=`)[0]??``,t=e.startsWith(`no-`)?e.slice(3):e;t&&n.push(t);continue}if(!r.startsWith(`-`)||r===`-`)continue;let e=r.slice(1);for(let r of e){let e=t[r];if(!e||(n.push(e.canonical),e.type===`value`))break}}return n}function H(e,t,n){let r=new Set([...n.safeFlags,`quiet`,`local`]),i={...z,...n.shortFlagAliases},a=new Set,o={};for(let n of V(t,i)){a.add(n);let t=e[n]??e[B(n)];o[n]=r.has(n)?t:`<REDACTED>`}let s=[...a].sort();return{sanitizedArgs:o,argsUsed:s,argsCombination:s.join(`, `)}}const U=new Set([`SIGINT`,`SIGTERM`]),W=1024;function G(e){if(e instanceof t)return e.cancelled||e.signal&&U.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function K(e,t,n){let r;try{r=R()}catch{return n()}if(o(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:H(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let a=e.searchQuery===void 0?{}:{searchQuery:e.searchQuery.slice(0,W),...e.searchQuery.length>W?{searchQueryTruncated:!0}:{}},s=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:`success`,durationMs:Date.now()-s}),e}catch(e){let t=G(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:t,durationMs:Date.now()-s,...t===`error`?f(e):{}}),e}}function q(e,t){return{...e,handler:n=>K(t,n,()=>e.handler(n))}}export{_ as a,C as c,w as d,T as f,R as i,S as l,D as m,q as n,g as o,k as p,H as r,O as s,K as t,E as u};
2
+ import{t as e}from"./agent-context-GRiQ4zRU.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{Q as n}from"./dist-BuCJ_55d.mjs";import{n as r}from"./version-Di2YJMgh.mjs";import{t as i}from"./delegate-B6LetRpZ.mjs";import{i as a,r as o}from"./lifecycle-C7tAC1Mn.mjs";import{i as s,t as c}from"./interactive-C-o16XQs.mjs";import{t as l}from"./request-headers-B72_sA_G.mjs";import{n as u,t as d}from"./state-BaGRaYow.mjs";import{t as f}from"./error-sanitization-CJ5OLJrh.mjs";import p from"node:os";import{createHash as m,randomUUID as h}from"node:crypto";const g=new Date(`2026-01-01T00:00:00.000Z`),_=`CF_SEND_TELEMETRY`,v=`WRANGLER_SEND_METRICS`,y=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function b(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t===`true`||t===`1`)return!0;if(t===`false`||t===`0`)return!1}function x(){let e=b(process.env[_]);if(e!==void 0)return{enabled:e,source:`env`};let t=b(process.env[v]);if(t!==void 0)return{enabled:t,source:`wrangler-env`}}function S(){return x()?.enabled}function C(){let e=d();if(typeof e.deviceId==`string`&&y.test(e.deviceId))return e.deviceId;let t=h();return u({deviceId:t}),t}function w(){return d().deviceId===void 0}function T(){if(n())return{enabled:!1,source:`do-not-track`};let e=x();if(e!==void 0)return e;let t=d().telemetry?.preference;return t?.enabled===!1?{enabled:!1,source:`config`}:t?.enabled===!0&&typeof t.date==`string`&&new Date(t.date)>=g?{enabled:!0,source:`config`}:{enabled:!0,source:`default`}}function E(e){switch(e){case`do-not-track`:return`DO_NOT_TRACK`;case`env`:return _;case`wrangler-env`:return v;default:return}}function D(e){u({telemetry:{preference:{enabled:e,date:new Date().toISOString()}}})}function O(){return d().telemetry?.bannerLastShown}function k(e){u({telemetry:{bannerLastShown:e}})}function A(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function j(){return p.version()}function M(){return process.arch}function N(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function P(){let e=process.env.npm_config_user_agent??``;return e.startsWith(`pnpm`)?`pnpm`:e.startsWith(`yarn`)?`yarn`:e.startsWith(`bun`)?`bun`:e.startsWith(`npm`)?`npm`:`unknown`}function F(e,t,n){return m(`sha256`).update(`cf-agent-session-v1\0`).update(e).update(`\0`).update(t).update(`\0`).update(n).digest(`hex`).slice(0,32)}function I(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let L;function R(){if(L)return L;let[t,n,o]=r.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),u=Date.now(),d=0,f=w(),{enabled:p}=T(),m=e(),h=m.harness?.id??null,g=m.matches.find(e=>e.sessionId);function _(){let e=I(),a=C();return{product:`cf`,cliVersion:r,cliMajor:t??0,cliMinor:n??0,cliPatch:o??0,...e?{prereleaseLabel:e}:{},osPlatform:A(),osVersion:j(),arch:M(),nodeVersion:N(),packageManager:P(),deviceId:a,amplitude_session_id:u,amplitude_event_id:d++,...g?.sessionId?{agentSessionKey:F(a,g.harness.id,g.sessionId)}:{},isFirstUsage:f,isCI:c,isInteractive:s(),cliMode:l(),agent:h,delegated:!!process.env[i]}}function v(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};if(process.env.DEBUG&&console.error(`Telemetry ${p?`sending`:`would send`}: ${JSON.stringify(n)}`),p)return fetch(`https://sparrow.cloudflare.com/api/v1/event`,{method:`POST`,signal:AbortSignal.timeout(1e3),headers:{Accept:`*/*`,"Content-Type":`application/json`,"Sparrow-Source-Key":`50598e014ed44c739ec8074fdc16057c`},mode:`cors`,keepalive:!0,body:JSON.stringify(n)}).then(()=>void 0).catch(e=>{process.env.DEBUG&&console.error(`Telemetry failed to send:`,e instanceof Error?e.message:String(e))})}return L={enabled:p,sendCommandEvent(e,t){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(p)try{a(v(e,{..._(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},L}const z={q:{canonical:`quiet`,type:`boolean`},z:{canonical:`zone`,type:`value`},m:{canonical:`mode`,type:`value`},h:{canonical:`help`,type:`boolean`},v:{canonical:`version`,type:`boolean`}};function B(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function V(e,t){let n=[];for(let r of e){if(r===`--`)break;if(r.startsWith(`--`)){let e=r.slice(2).split(`=`)[0]??``,t=e.startsWith(`no-`)?e.slice(3):e;t&&n.push(t);continue}if(!r.startsWith(`-`)||r===`-`)continue;let e=r.slice(1);for(let r of e){let e=t[r];if(!e||(n.push(e.canonical),e.type===`value`))break}}return n}function H(e,t,n){let r=new Set([...n.safeFlags,`quiet`,`local`]),i={...z,...n.shortFlagAliases},a=new Set,o={};for(let n of V(t,i)){a.add(n);let t=e[n]??e[B(n)];o[n]=r.has(n)?t:`<REDACTED>`}let s=[...a].sort();return{sanitizedArgs:o,argsUsed:s,argsCombination:s.join(`, `)}}const U=new Set([`SIGINT`,`SIGTERM`]),W=1024;function G(e){if(e instanceof t)return e.cancelled||e.signal&&U.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function K(e,t,n){let r;try{r=R()}catch{return n()}if(o(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:H(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let a=e.searchQuery===void 0?{}:{searchQuery:e.searchQuery.slice(0,W),...e.searchQuery.length>W?{searchQueryTruncated:!0}:{}},s=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:`success`,durationMs:Date.now()-s}),e}catch(e){let t=G(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,...a,outcome:t,durationMs:Date.now()-s,...t===`error`?f(e):{}}),e}}function q(e,t){return{...e,handler:n=>K(t,n,()=>e.handler(n))}}export{_ as a,C as c,w as d,T as f,R as i,S as l,D as m,q as n,g as o,k as p,H as r,O as s,K as t,E as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./run-BqAAX99Z.mjs";export{e as runWithTelemetry};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t}from"./version-CH8K5y4G.mjs";import{i as n}from"./cf-Bh_fTFIj.mjs";import{i as r}from"./body-parser-hh2avzkz.mjs";import{n as i}from"./input-validation-Dk52b0me.mjs";import{o as a}from"./prompt-DjRAo2Up.mjs";import{mkdirSync as o,readFileSync as s,writeFileSync as c}from"node:fs";import{dirname as l,join as u}from"node:path";import{isDeepStrictEqual as d}from"node:util";import{createHash as f}from"node:crypto";const p=5e3;function m(e,t=new WeakSet){if(typeof e!=`object`||!e||Array.isArray(e)||t.has(e))return!1;t.add(e);let n=e,r=new Set([`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]),i=Array.isArray(n.type)?n.type:[n.type];if(n.type!==void 0&&(i.length===0||!i.every(e=>typeof e==`string`&&r.has(e)))||n.description!==void 0&&typeof n.description!=`string`||n.title!==void 0&&typeof n.title!=`string`||n.required!==void 0&&(!Array.isArray(n.required)||!n.required.every(e=>typeof e==`string`))||n.enum!==void 0&&!Array.isArray(n.enum)||n.oneOf!==void 0&&(!Array.isArray(n.oneOf)||n.oneOf.length===0||!n.oneOf.every(e=>m(e,t)))||n.anyOf!==void 0&&(!Array.isArray(n.anyOf)||n.anyOf.length===0||!n.anyOf.every(e=>m(e,t)))||n.allOf!==void 0&&(!Array.isArray(n.allOf)||n.allOf.length===0||!n.allOf.every(e=>m(e,t)))||n.if!==void 0&&!m(n.if,t)||n.then!==void 0&&!m(n.then,t)||n.additionalProperties!==void 0&&typeof n.additionalProperties!=`boolean`&&!m(n.additionalProperties,t)||n.uniqueItems!==void 0&&typeof n.uniqueItems!=`boolean`||[`minLength`,`maxLength`,`minimum`,`maximum`,`multipleOf`,`minItems`,`maxItems`,`minProperties`,`maxProperties`].some(e=>n[e]!==void 0&&(typeof n[e]!=`number`||!Number.isFinite(n[e])))||[`exclusiveMinimum`,`exclusiveMaximum`].some(e=>n[e]!==void 0&&typeof n[e]!=`boolean`&&(typeof n[e]!=`number`||!Number.isFinite(n[e])))||n.items!==void 0&&!(Array.isArray(n.items)?n.items:[n.items]).every(e=>m(e,t))||n.properties!==void 0&&(n.properties===null||typeof n.properties!=`object`||Array.isArray(n.properties)||!Object.values(n.properties).every(e=>m(e,t))))return!1;if(n.pattern!==void 0){if(typeof n.pattern!=`string`)return!1;try{new RegExp(n.pattern)}catch{return!1}}return!0}function h(e,t){if(typeof e!=`object`||!e)return;let n=e[t]??e;if(typeof n!=`object`||!n||!m(n))return;let r=n;return r.properties??r.oneOf??r.anyOf??r.allOf?r:void 0}function g(e,r){let i=f(`sha256`).update([t,...r].join(` `)).digest(`hex`).slice(0,32);return u(n(),`cache`,e,`${i}.json`)}function _(e,t){try{let n=JSON.parse(s(g(e,t),`utf-8`));return typeof n?.fetchedAt==`number`&&Date.now()-n.fetchedAt<=36e5&&m(n.schema)?n.schema:void 0}catch{return}}function v(e,t,n){try{let r=g(e,t);o(l(r),{recursive:!0}),c(r,JSON.stringify({fetchedAt:Date.now(),schema:n}),`utf-8`)}catch{}}function ee(e){if(typeof e!=`object`||!e)return`the request failed`;let t=e.statusCode;if(t===404)return`not found, or this account can't access it`;if(t===401)return"credentials were rejected; update `CLOUDFLARE_API_TOKEN` or run `cf auth login`";if(t===403)return`these credentials can't read it — check your API token permissions`;let n=e.message;if(!n)return`the request failed`;let r=(n.split(`
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t}from"./version-Di2YJMgh.mjs";import{i as n}from"./cf-Bh_fTFIj.mjs";import{i as r}from"./body-parser-hh2avzkz.mjs";import{n as i}from"./input-validation-Dk52b0me.mjs";import{o as a}from"./prompt-CbKaAX24.mjs";import{mkdirSync as o,readFileSync as s,writeFileSync as c}from"node:fs";import{dirname as l,join as u}from"node:path";import{isDeepStrictEqual as d}from"node:util";import{createHash as f}from"node:crypto";const p=5e3;function m(e,t=new WeakSet){if(typeof e!=`object`||!e||Array.isArray(e)||t.has(e))return!1;t.add(e);let n=e,r=new Set([`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]),i=Array.isArray(n.type)?n.type:[n.type];if(n.type!==void 0&&(i.length===0||!i.every(e=>typeof e==`string`&&r.has(e)))||n.description!==void 0&&typeof n.description!=`string`||n.title!==void 0&&typeof n.title!=`string`||n.required!==void 0&&(!Array.isArray(n.required)||!n.required.every(e=>typeof e==`string`))||n.enum!==void 0&&!Array.isArray(n.enum)||n.oneOf!==void 0&&(!Array.isArray(n.oneOf)||n.oneOf.length===0||!n.oneOf.every(e=>m(e,t)))||n.anyOf!==void 0&&(!Array.isArray(n.anyOf)||n.anyOf.length===0||!n.anyOf.every(e=>m(e,t)))||n.allOf!==void 0&&(!Array.isArray(n.allOf)||n.allOf.length===0||!n.allOf.every(e=>m(e,t)))||n.if!==void 0&&!m(n.if,t)||n.then!==void 0&&!m(n.then,t)||n.additionalProperties!==void 0&&typeof n.additionalProperties!=`boolean`&&!m(n.additionalProperties,t)||n.uniqueItems!==void 0&&typeof n.uniqueItems!=`boolean`||[`minLength`,`maxLength`,`minimum`,`maximum`,`multipleOf`,`minItems`,`maxItems`,`minProperties`,`maxProperties`].some(e=>n[e]!==void 0&&(typeof n[e]!=`number`||!Number.isFinite(n[e])))||[`exclusiveMinimum`,`exclusiveMaximum`].some(e=>n[e]!==void 0&&typeof n[e]!=`boolean`&&(typeof n[e]!=`number`||!Number.isFinite(n[e])))||n.items!==void 0&&!(Array.isArray(n.items)?n.items:[n.items]).every(e=>m(e,t))||n.properties!==void 0&&(n.properties===null||typeof n.properties!=`object`||Array.isArray(n.properties)||!Object.values(n.properties).every(e=>m(e,t))))return!1;if(n.pattern!==void 0){if(typeof n.pattern!=`string`)return!1;try{new RegExp(n.pattern)}catch{return!1}}return!0}function h(e,t){if(typeof e!=`object`||!e)return;let n=e[t]??e;if(typeof n!=`object`||!n||!m(n))return;let r=n;return r.properties??r.oneOf??r.anyOf??r.allOf?r:void 0}function g(e,r){let i=f(`sha256`).update([t,...r].join(` `)).digest(`hex`).slice(0,32);return u(n(),`cache`,e,`${i}.json`)}function _(e,t){try{let n=JSON.parse(s(g(e,t),`utf-8`));return typeof n?.fetchedAt==`number`&&Date.now()-n.fetchedAt<=36e5&&m(n.schema)?n.schema:void 0}catch{return}}function v(e,t,n){try{let r=g(e,t);o(l(r),{recursive:!0}),c(r,JSON.stringify({fetchedAt:Date.now(),schema:n}),`utf-8`)}catch{}}function ee(e){if(typeof e!=`object`||!e)return`the request failed`;let t=e.statusCode;if(t===404)return`not found, or this account can't access it`;if(t===401)return"credentials were rejected; update `CLOUDFLARE_API_TOKEN` or run `cf auth login`";if(t===403)return`these credentials can't read it — check your API token permissions`;let n=e.message;if(!n)return`the request failed`;let r=(n.split(`
3
3
  `)[0]??``).replace(/\.$/,``);return/^"?timeout"?$/i.test(r)?`the request timed out`:r}const y=new Set(`$comment.$defs.$id.$schema.additionalProperties.allOf.anyOf.const.default.definitions.deprecated.description.discriminator.enum.example.examples.exclusiveMaximum.exclusiveMinimum.externalDocs.if.items.maxItems.maxLength.maxProperties.maximum.minItems.minLength.minProperties.minimum.multipleOf.oneOf.pattern.properties.readOnly.required.then.title.type.uniqueItems.writeOnly.xml`.split(`.`));function te(e){let t=e.additionalProperties!==void 0&&typeof e.additionalProperties==`object`?[e.additionalProperties]:[],n=e.items===void 0?[]:Array.isArray(e.items)?e.items:[e.items];return[...Object.values(e.properties??{}),...t,...n,...e.oneOf??[],...e.anyOf??[],...e.allOf??[],...e.if?[e.if]:[],...e.then?[e.then]:[]]}function b(e,t){if(t.has(e))return!1;t.add(e);let n=e;return n.nullable===!0||n[`x-nullable`]===!0?!1:Object.keys(n).every(e=>y.has(e)||e.startsWith(`x-`))&&te(e).every(e=>b(e,t))}function ne(e){return b(e,new WeakSet)}function re(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function ie(e){let t=e.path.at(-1)??e.name,n=a(e.schema.title?.trim()||re(t)),r=e.description?a(e.description.trim()):void 0;return!r||r.toLocaleLowerCase()===n.toLocaleLowerCase()?n:`${n} — ${r}`}function x(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/_/g,`-`).toLowerCase()}const ae=new Set([`__proto__`,`constructor`,`prototype`]);function S(e){return e.every(e=>!ae.has(e))}function C(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function w(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function oe(e){return e.type===void 0&&e.properties===void 0&&e.enum===void 0&&e.const===void 0&&e.oneOf===void 0&&e.anyOf===void 0}function se(e){if(e===null)return`json`;if(Array.isArray(e))return`array`;switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`object`:return`object`;default:return`string`}}function T(e){let t=ce(e);if(t.length>1){let e=new Set(t.map(T));return e.size===2&&e.has(`string`)&&e.has(`array`)?`string-or-array`:e.has(void 0)?void 0:e.size===1?[...e][0]??`json`:`json`}if(t[0]!==e)return T(t[0]??{});if(Array.isArray(e.type)&&e.type.includes(`object`)&&e.type.some(e=>e!==`object`))return`json`;let n=Array.isArray(e.type)?e.type.find(e=>e!==`null`):e.type;if(n===`null`||Array.isArray(e.type)&&e.type.length===1&&e.type[0]===`null`)return`json`;if(n===void 0){let t=e.const===void 0?e.enum:[e.const];if(t?.length){let e=new Set(t.map(se));return e.size===1?[...e][0]??`json`:`json`}}if(n===void 0&&e.properties)return`object`;if(n===void 0&&oe(e))return`json`;switch(n){case`number`:case`integer`:return`number`;case`boolean`:return`boolean`;case`array`:return`array`;case`object`:return`object`;default:return`string`}}function ce(e){let t=e.oneOf??e.anyOf;return t?.length?t:[e]}function E(e,t){if(e===void 0)return t;if(t===void 0)return e;let n=new Set(Array.isArray(e)?e:[e]),r=new Set(Array.isArray(t)?t:[t]),i=(e,t)=>e.has(t)||t===`integer`&&e.has(`number`),a=[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`].filter(e=>i(n,e)&&i(r,e));return a.includes(`number`)&&a.splice(a.indexOf(`integer`),1),a.length===1?a[0]:a.length>1?a:void 0}function le(e,t){return e===void 0?t:t===void 0?e:e.filter(e=>t.some(t=>d(e,t)))}function D(e,t){let n=t.flatMap(t=>[...t[e]===void 0?[]:[t[e]],...(t.allOf??[]).flatMap(t=>ue(e,t))]),r=n[0];return n.length>0&&n.every(e=>d(e,r))?r:void 0}function ue(e,t){return[...t[e]===void 0?[]:[t[e]],...(t.allOf??[]).flatMap(t=>ue(e,t))]}function de(e,t){return{type:E(e.type,t.type),title:e.title??t.title,description:e.description??t.description,enum:le(e.enum,t.enum),const:D(`const`,[e,t]),default:D(`default`,[e,t]),oneOf:e.oneOf===void 0?t.oneOf:t.oneOf===void 0?e.oneOf:void 0,anyOf:e.anyOf===void 0?t.anyOf:t.anyOf===void 0?e.anyOf:void 0,allOf:[e,t]}}function O(e){if(!e.allOf?.length)return e;let t=new Map(Object.entries(e.properties??{})),n=new Set(e.required??[]),r=e.type,i=e.title,a=e.description,o=e.enum;for(let s of e.allOf){let e=O(s);r=E(r,e.type),i??=e.title,a??=e.description,o=le(o,e.enum);for(let t of e.required??[])n.add(t);for(let[n,r]of Object.entries(e.properties??{})){let e=t.get(n);t.set(n,e===void 0?r:de(e,r))}}return{...e,type:r,title:i,description:a,enum:o,const:D(`const`,[e]),default:D(`default`,[e]),properties:t.size>0?Object.fromEntries(t):e.properties,required:n.size>0?[...n]:e.required}}function fe(e){return{...e,oneOf:void 0,anyOf:void 0}}function k(e){return(e.allOf??[]).flatMap(e=>[e,...k(e)])}function A(e){return[e,...k(e)].flatMap(e=>[...e.oneOf?.length?[e.oneOf]:[],...e.anyOf?.length?[e.anyOf]:[]])}function j(e){return Object.keys(O(fe(e)).properties??{}).length>0?!0:A(e).some(e=>e.some(j))}function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function N(e){let t=O(e),n=t.type===void 0?void 0:Array.isArray(t.type)?t.type:[t.type];return n?.length&&n.every(e=>e===`object`)?!0:n!==void 0&&!n.includes(`object`)?!1:t.const===void 0?t.enum?.length&&t.enum.every(e=>M(e))||A(e).some(e=>e.every(N))?!0:e.allOf?.some(N)??!1:M(t.const)}function P(e){let t=e.oneOf??e.anyOf;if(!t?.length)return;let n=[];for(let e of t){let t=e.const===void 0?e.enum?.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)?e.enum:void 0:[e.const];if(!t?.length||!t.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`))return;for(let r of t)n.push({value:r,label:t.length===1&&e.title?a(e.title):void 0})}return n}function pe(e){let t=e.enum?.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)?e.enum:void 0;return t?.length?t.map(e=>({value:e})):P(e)}function F(e){let t=e.oneOf??e.anyOf;if(!t?.length)return;let n=[];for(let e of t){let t=e.const===void 0?e.enum?.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)?e.enum:void 0:[e.const];if(t?.length&&t.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`)){for(let r of t){let t=K(r),i=e.title?a(e.title):void 0;n.push(i?`${t} (${i})`:t)}continue}if(e.pattern&&T(e)===`string`){let t=a(e.pattern),r=e.title?a(e.title):void 0;n.push(r?`${t} (${r})`:t);continue}return}return n.length>0?n:void 0}function I(e,t,n,r,i){if(!S(e))return;let a=i??T(t);if(a===void 0)return;let o=a===`json`?void 0:pe(t),s=o?.map(({value:e})=>String(e)),c=Object.fromEntries((o??[]).filter(({value:e,label:t})=>t&&t!==String(e)).map(({value:e,label:t})=>[String(e),t])),l=e.map(x).join(`-`);if(l!==`mode`)return{name:l,path:e,type:a,required:n,requiredWhen:r,description:t.description?.split(`
4
4
  `)[0]??t.title,choices:s?.length?s:void 0,choiceLabels:Object.keys(c).length>0?c:void 0,schema:t}}function me(e,t){return e===t?e:[...new Set([e,t])].every(e=>e===`string`||e===`array`||e===`string-or-array`)?`string-or-array`:`json`}function he(e,t){let n=me(e.type,t.type),r=e.schema.description??t.schema.description,i=n===`json`||n===`string-or-array`?{description:r}:{type:n===`number`?`number`:n,description:r};return{...e,type:n,required:e.required&&t.required,requiredWhen:L(e.requiredWhen,t.requiredWhen)?e.requiredWhen:void 0,choices:void 0,choiceLabels:void 0,schema:i,requiredIf:d(e.requiredIf,t.requiredIf)?e.requiredIf:void 0,requiredContainer:e.requiredContainer&&t.requiredContainer?!0:void 0}}function ge(e,t={}){let n=new Set((t.exclude??[]).map(e=>e.join(`.`))),r=new Map,i=new Set,a=(e,t,n)=>{let a=r.get(e);if(!n){i.add(e),r.set(e,t);return}i.has(e)||r.set(e,a===void 0?t:he(a,t))},o=(e,t,o)=>{for(let s of[e,...k(e)]){let c=s.if,l=s.then?O(s.then):void 0,u=l?.required;if(!c||!u?.length)continue;let f=Object.keys(c),p=c.type===void 0?void 0:Array.isArray(c.type)?c.type:[c.type];if(f.some(e=>![`$comment`,`description`,`properties`,`required`,`title`,`type`].includes(e))||p!==void 0&&!p.includes(`object`))continue;let m=new Set(c.required??[]),h=c.properties??{};if(Object.keys(h).some(e=>!m.has(e)))continue;let g=[],_=!0;for(let e of m){if(!S([...t,e])){_=!1;break}let n=C(h,e),r;if(n){if(Object.keys(n).some(e=>![`$comment`,`const`,`default`,`description`,`enum`,`examples`,`title`,`type`].includes(e))){_=!1;break}if(r=n.enum,n.const!==void 0&&(r=(r??[n.const]).filter(e=>d(e,n.const))),n.type!==void 0){if(r===void 0){_=!1;break}let e=Array.isArray(n.type)?n.type:[n.type];r=r.filter(t=>e.some(e=>we(e,t)))}}g.push({path:[...t,e],values:r})}if(!(!_||g.length===0))for(let s of u){let c=[...t,s].join(`.`);if(n.has(c))continue;let u={predicates:g},f=r.get(c),p=o&&C(e.properties,s)===void 0&&!i.has(c);if(!f||p){let e=C(l?.properties,s),n=e===void 0?void 0:I([...t,s],O(e),!1);n&&(a(c,n,o),f=r.get(c))}!o&&f&&!f.requiredIf?.some(e=>d(e,u))&&(f.requiredIf=[...f.requiredIf??[],u])}}},s=(e,t,i,c=!1)=>{let l=O(fe(e));if(l.properties){let e=new Set(l.required??[]);for(let[o,u]of Object.entries(l.properties)){let l=[...t,o],d=l.join(`.`);if(!S(l)||n.has(d))continue;let f=O(u),p=j(u),m=p&&N(u),h=!c&&e.has(o),g=h&&i===void 0,_=h&&i!==void 0?i:void 0;if(m){s(u,l,h?i:l,c);let e=[...r.values()].some(e=>e.required===g&&L(e.requiredWhen,_)&&e.path.length>l.length&&l.every((t,n)=>e.path[n]===t));if(h&&!e){let e=I(l,u,g,_);e&&a(d,{...e,requiredContainer:!0},c)}continue}let v=I(l,f,g,_,p?`json`:void 0);v&&a(d,v,c)}}for(let n of A(e))for(let e of n)s(e,t,i,!0);for(let n of[e,...k(e)])n.if&&n.then&&s(n.then,t,i,!0);o(l,t,c)};return s(e,[]),[...r.values()].sort((e,t)=>e.required===t.required?e.name.localeCompare(t.name):e.required?-1:1)}function L(e,t){return e===t||e!==void 0&&t!==void 0&&e.length===t.length&&e.every((e,n)=>e===t[n])}function _e(t,n){if(t.length===0)return`${e.brand(a(n))}\n (no input fields)`;let r=process.stdout.columns??80,i=t.map(e=>`--${a(e.name)}`),o=Math.min(Math.max(...i.map(e=>e.length))+2,42),s=t.map((e,t)=>{let n=[`[${e.type}]`];e.required?n.push(`[required]`):e.requiredWhen&&n.push(`[required with --${a(e.requiredWhen.map(x).join(`-`))}-*]`),e.requiredIf&&n.push(`[conditionally required]`),e.choices&&n.push(`[choices: ${e.choices.map(t=>{let n=a(t),r=e.choiceLabels&&Object.hasOwn(e.choiceLabels,t)?e.choiceLabels[t]:void 0;return r?`${a(r)} (${n})`:n}).join(`, `)}]`),e.schema.const!==void 0&&n.push(`[must be: ${a(JSON.stringify(e.schema.const)??`undefined`)}]`),e.schema.default!==void 0&&n.push(`[default: ${a(JSON.stringify(e.schema.default)??`undefined`)}]`);let s=n.join(` `),c=Math.max(r-o-4,20)-s.length-1,l=e.description===void 0?void 0:a(e.description),u=l===void 0||c<12?``:l.length>c?`${l.slice(0,c-1)}…`:l,d=i[t]??``;return` ${d.length<o?d.padEnd(o):`${d} `}${[u,s].filter(Boolean).join(` `)}`});return[e.brand(a(n)),...s].join(`
5
5
  `)}const ve=`_ $0 -- body dry-run dryRun help h local m mode persist-to persistTo profile quiet q version v zone z`.split(` `);function R(e,t){let n=Object.hasOwn(t,e.name)?t[e.name]:void 0,r=w(e.name);return n===void 0&&Object.hasOwn(t,r)?t[r]:n}function ye(e,t,n){return e.filter(r=>{let i=n!==void 0&&B(n,r.path).found;return V(r,e,t,n)&&R(r,t)===void 0&&!i&&!H(r.path,e,t)&&!(r.requiredContainer&&U(r,e,t))})}function z(e,t){let n=e=>B(t,e);return e.filter(e=>be(e,n)&&!n(e.path).found)}function B(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n||Array.isArray(n)||!Object.hasOwn(n,e))return{found:!1};n=n[e]}return{found:!0,value:n}}function be(e,t){return e.required||e.requiredWhen!==void 0&&t(e.requiredWhen).found||(e.requiredIf?.some(({predicates:e})=>e.every(({path:e,values:n})=>{let r=t(e);return r.found&&(n===void 0||n.some(e=>d(r.value,e)))}))??!1)}function V(e,t,n,r){return e.required||e.requiredWhen!==void 0&&(H(e.requiredWhen,t,n)||r!==void 0&&B(r,e.requiredWhen).found)||(e.requiredIf?.some(({predicates:e})=>e.every(({path:e,values:i})=>{let a=xe(e,t,n),o=a.found||r===void 0?a:B(r,e),s=!a.found||a.descriptor===void 0||!L(a.descriptor.path,e)?o.value:q(a.descriptor,o.value,[]);return o.found&&(i===void 0||i.some(e=>d(s,e)))}))??!1)}function xe(e,t,n){for(let r of t){let t=R(r,n);if(t===void 0||r.path.length>e.length||!r.path.every((t,n)=>e[n]===t))continue;let i=t;if(typeof i==`string`&&r.path.length<e.length)try{i=JSON.parse(i)}catch{continue}for(let t of e.slice(r.path.length)){if(typeof i!=`object`||!i||Array.isArray(i)||!Object.hasOwn(i,t)){i=void 0;break}i=i[t]}if(i!==void 0)return{found:!0,value:i,descriptor:r}}return{found:!1}}function H(e,t,n){return t.some(t=>{let r=R(t,n);if(r===void 0)return!1;if(t.path.length>=e.length)return e.every((e,n)=>t.path[n]===e);if(!t.path.every((t,n)=>e[n]===t))return!1;let i=r;if(typeof i==`string`)try{i=JSON.parse(i)}catch{return!1}for(let n of e.slice(t.path.length)){if(typeof i!=`object`||!i||Array.isArray(i)||!Object.hasOwn(i,n))return!1;i=i[n]}return!0})}function U(e,t,n){return t.some(t=>t!==e&&t.path.length>e.path.length&&e.path.every((e,n)=>t.path[n]===e)&&R(t,n)!==void 0)}function W(e){return e.flatMap(e=>[e.name,w(e.name)])}function G(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)??`undefined`}catch{return`unprintable value`}}function K(e){return a(G(e))}function q(e,t,n){let r=r=>{n.push(`--${a(e.name)} expects ${r} (got '${K(t)}')`)};switch(e.type){case`number`:{let n=typeof t==`number`?t:Number(G(t)),i=Array.isArray(e.schema.type)?e.schema.type:[e.schema.type];return Number.isFinite(n)?i.includes(`integer`)&&!i.includes(`number`)&&!Number.isInteger(n)?r(`an integer`):n:r(`a finite number`)}case`boolean`:return typeof t==`boolean`?t:t===`true`?!0:t===`false`?!1:r(`a boolean`);case`array`:case`object`:{let n=t;if(typeof t==`string`)try{n=JSON.parse(t)}catch{return r(`a JSON ${e.type}`)}return(e.type===`array`?Array.isArray(n):typeof n==`object`&&n&&!Array.isArray(n))?n:r(`a JSON ${e.type}`)}case`json`:{let n=Array.isArray(e.schema.type)?e.schema.type:[e.schema.type];if(n.length===1&&n[0]===`null`)return t===null||t===`null`?null:r(`null`);if(typeof t!=`string`)return t;try{return JSON.parse(t)}catch{return i(t,e.name,`json`)}}case`string-or-array`:if(typeof t!=`string`)return Array.isArray(t)?t:r(`a string or JSON array`);try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return i(t,e.name,`text`);default:{let n=Array.isArray(t)?t[t.length-1]:t;return typeof n==`boolean`?r(`a string`):typeof n==`string`?i(n,e.name,`text`):G(n)}}}function J(e){return Array.from(e).length}function Se(e,t,n){let r=a(e.name),{const:i,pattern:o,minLength:s,maxLength:c,minimum:l,maximum:u,exclusiveMinimum:f,exclusiveMaximum:p}=e.schema;if(i!==void 0&&!d(t,i)){n.push(`--${r} must be ${a(JSON.stringify(i)??`undefined`)}`);return}let m=e.schema.enum??P(e.schema)?.map(e=>e.value);if(m!==void 0&&!m.some(e=>d(t,e))){n.push(`--${r} must be one of: ${m.map(K).join(`, `)}`);return}if(typeof t==`string`){let e=J(t);o!==void 0&&!new RegExp(o).test(t)&&n.push(`--${r} does not match the required format (${a(o)})`),s!==void 0&&e<s&&n.push(`--${r} must be at least ${s} characters`),c!==void 0&&e>c&&n.push(`--${r} must be at most ${c} characters`)}typeof t==`number`&&(l!==void 0&&(f===!0?t<=l:t<l)&&n.push(f===!0?`--${r} must be greater than ${l}`:`--${r} must be at least ${l}`),u!==void 0&&(p===!0?t>=u:t>u)&&n.push(p===!0?`--${r} must be less than ${u}`:`--${r} must be at most ${u}`),typeof f==`number`&&t<=f&&n.push(`--${r} must be greater than ${f}`),typeof p==`number`&&t>=p&&n.push(`--${r} must be less than ${p}`))}function Ce(e,t){let n=[],r=q(e,t,n);if(r===void 0||(Se(e,r,n),n.length>0))return n[0];let i=Z(e.schema,r);return i.length>0?`--${a(e.name)} ${i[0]?.replace(/^the request body /,``)}`:void 0}function we(e,t){switch(e){case`null`:return t===null;case`array`:return Array.isArray(t);case`object`:return typeof t==`object`&&!!t&&!Array.isArray(t);case`integer`:return typeof t==`number`&&Number.isInteger(t);default:return typeof t===e}}function Te(e){return e.map(e=>e===`integer`?`an integer`:`a${/^[aeiou]/.test(e)?`n`:``} ${e}`).join(` or `)}function Y(e){return e.length===0?`the request body`:`\`/${e.map(e=>a(e).replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}\``}function X(e,t,n){let r=[],i=Y(n),o=e.type===void 0?[]:Array.isArray(e.type)?e.type:[e.type];if(o.length>0&&!o.some(e=>we(e,t)))return[`${i} must be ${Te(o)}`];if(e.const!==void 0&&!d(t,e.const))return[`${i} must be ${a(JSON.stringify(e.const)??`undefined`)}`];if(e.enum&&!e.enum.some(e=>d(t,e)))return[`${i} must be one of: ${e.enum.map(K).join(`, `)}`];if(e.oneOf?.length&&e.oneOf.filter(e=>X(e,t,n).length===0).length!==1){let t=F(e);return[t?`${i} must be one of: ${t.join(`, `)}`:`${i} must match exactly one allowed shape`]}if(e.anyOf?.length&&!e.anyOf.some(e=>X(e,t,n).length===0)){let t=F(e);return[t?`${i} must be one of: ${t.join(`, `)}`:`${i} must match an allowed shape`]}for(let i of e.allOf??[])r.push(...X(i,t,n));if(e.if&&X(e.if,t,n).length===0&&e.then&&r.push(...X(e.then,t,n)),typeof t==`string`){let n=J(t);e.pattern!==void 0&&!new RegExp(e.pattern).test(t)&&r.push(`${i} does not match the required format (${a(e.pattern)})`),e.minLength!==void 0&&n<e.minLength&&r.push(`${i} must be at least ${e.minLength} characters`),e.maxLength!==void 0&&n>e.maxLength&&r.push(`${i} must be at most ${e.maxLength} characters`)}if(typeof t==`number`&&(e.minimum!==void 0&&(e.exclusiveMinimum===!0?t<=e.minimum:t<e.minimum)&&r.push(e.exclusiveMinimum===!0?`${i} must be greater than ${e.minimum}`:`${i} must be at least ${e.minimum}`),e.maximum!==void 0&&(e.exclusiveMaximum===!0?t>=e.maximum:t>e.maximum)&&r.push(e.exclusiveMaximum===!0?`${i} must be less than ${e.maximum}`:`${i} must be at most ${e.maximum}`),typeof e.exclusiveMinimum==`number`&&t<=e.exclusiveMinimum&&r.push(`${i} must be greater than ${e.exclusiveMinimum}`),typeof e.exclusiveMaximum==`number`&&t>=e.exclusiveMaximum&&r.push(`${i} must be less than ${e.exclusiveMaximum}`),e.multipleOf!==void 0&&Math.abs(t/e.multipleOf-Math.round(t/e.multipleOf))>2**-52*10&&r.push(`${i} must be a multiple of ${e.multipleOf}`)),Array.isArray(t)){if(e.minItems!==void 0&&t.length<e.minItems&&r.push(`${i} must contain at least ${e.minItems} items`),e.maxItems!==void 0&&t.length>e.maxItems&&r.push(`${i} must contain at most ${e.maxItems} items`),e.uniqueItems&&t.some((e,n)=>t.slice(0,n).some(t=>d(e,t)))&&r.push(`${i} must contain unique items`),e.items&&!Array.isArray(e.items))for(let[i,a]of t.entries())r.push(...X(e.items,a,[...n,String(i)]));else if(Array.isArray(e.items))for(let[i,a]of e.items.entries())i<t.length&&r.push(...X(a,t[i],[...n,String(i)]))}if(typeof t==`object`&&t&&!Array.isArray(t)){let a=t,o=e.properties??{};for(let t of e.required??[])Object.hasOwn(a,t)||r.push(`${Y([...n,t])} is required`);for(let[t,i]of Object.entries(a)){let a=Object.hasOwn(o,t)?o[t]:void 0;a?r.push(...X(a,i,[...n,t])):e.additionalProperties===!1?r.push(`${Y([...n,t])} is not allowed`):e.additionalProperties&&typeof e.additionalProperties==`object`&&r.push(...X(e.additionalProperties,i,[...n,t]))}let s=Object.keys(a).length;e.minProperties!==void 0&&s<e.minProperties&&r.push(`${i} must contain at least ${e.minProperties} properties`),e.maxProperties!==void 0&&s>e.maxProperties&&r.push(`${i} must contain at most ${e.maxProperties} properties`)}return r}function Z(e,t){return[...new Set(X(e,t,[]))]}const Ee=[`const`,`enum`,`exclusiveMaximum`,`exclusiveMinimum`,`maxItems`,`maxLength`,`maxProperties`,`maximum`,`minItems`,`minLength`,`minProperties`,`minimum`,`multipleOf`,`pattern`,`required`,`title`,`type`,`uniqueItems`];function Q(e){let t=e,n=Object.keys(t);if(t.nullable===!0||t[`x-nullable`]===!0||n.some(e=>[`$dynamicRef`,`$recursiveRef`,`$ref`].includes(e)))return{schema:{},exact:!1};let r={},i=n.every(e=>y.has(e)||e.startsWith(`x-`));for(let t of Ee){let n=e[t];n!==void 0&&Object.assign(r,{[t]:n})}if(e.properties!==void 0){let t=Object.entries(e.properties).map(([e,t])=>{let n=Q(t);return i&&=n.exact,[e,n.schema]});r.properties=Object.fromEntries(t)}if(e.additionalProperties!==void 0&&!Object.hasOwn(t,`patternProperties`))if(typeof e.additionalProperties==`boolean`)r.additionalProperties=e.additionalProperties;else{let t=Q(e.additionalProperties);r.additionalProperties=t.schema,i&&=t.exact}if(e.items!==void 0&&!Object.hasOwn(t,`prefixItems`))if(Array.isArray(e.items))r.items=e.items.map(e=>{let t=Q(e);return i&&=t.exact,t.schema});else{let t=Q(e.items);r.items=t.schema,i&&=t.exact}let a=(e.allOf??[]).map(e=>{let t=Q(e);return i&&=t.exact,t.schema});if(e.anyOf?.length&&(r.anyOf=e.anyOf.map(e=>{let t=Q(e);return i&&=t.exact,t.schema})),e.oneOf?.length){let t=e.oneOf.map(Q),n=t.every(e=>e.exact);i&&=n,n?r.oneOf=t.map(e=>e.schema):a.push({anyOf:t.map(e=>e.schema)})}if(e.if&&e.then){let t=Q(e.if),n=Q(e.then);i&&=t.exact&&n.exact,t.exact&&a.push({if:t.schema,then:n.schema})}return a.length>0&&(r.allOf=a),{schema:r,exact:i}}function De(e,t){return Z(Q(e).schema,t)}function Oe(e,t,n){let r=e;for(let e of t.slice(0,-1)){let t=r[e];(typeof t!=`object`||!t||Array.isArray(t))&&(r[e]={}),r=r[e]}let i=t.at(-1);i!==void 0&&(r[i]=n)}function $(e,t=[]){let n=new Set([...ve,...t]),r=new Map;for(let t of Object.keys(e))!n.has(t)&&!r.has(x(t))&&r.set(x(t),t);return[...r.values()].sort()}function ke(e,t,n={}){let i=[],o=n.baseBody!==void 0,s=n.baseBody===void 0?{}:structuredClone(n.baseBody),c=e.filter(({path:e})=>S(e)),l=[...n.reserved??[],...W(c)];for(let e of c){let n=R(e,t);if(n===void 0){!o&&V(e,c,t)&&!H(e.path,c,t)&&!(e.requiredContainer&&U(e,c,t))&&i.push(`--${a(e.name)} is required`);continue}let l=q(e,n,i);l!==void 0&&(Se(e,l,i),o?Oe(s,e.path,l):r(s,e.path,l))}if(o)for(let e of z(c,s))R(e,t)===void 0&&i.push(`--${a(e.name)} is required`);for(let e of $(t,l))i.push(`Unknown flag --${a(e)}`);return{body:s,errors:i}}export{v as _,z as a,ge as c,Z as d,De as f,_ as g,h,ye as i,$ as l,ee as m,W as n,_e as o,p,ne as r,ie as s,ke as t,Ce as u};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-CQc36Viv.mjs";import{a as t,t as n}from"./context-M2Ho8pi3.mjs";import{a as r,r as i}from"./auth-BjxUTZWb.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BnIv4lh5.mjs";import{t as c}from"./run-Duj1fsxa.mjs";import"./telemetry-Bn5lYtiy.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";import{n as d}from"./prompt-DjRAo2Up.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage("$0 scim groups create\n\nCreates a new SCIM Group (user group) for the account. The `displayName` must not be empty and must not begin with `CF` (reserved for system groups).").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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const m={command:`create`,describe:`Create SCIM Group`,builder:p,handler:async d=>c({command:`scim groups create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Groups`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:e,headers:{"Content-Type":`application/scim+json`}})),{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:e,headers:{"Content-Type":`application/scim+json`}})),{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function h(e){return e.usage(`$0 scim groups delete <group-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-Cibc7DIM.mjs";import{a as r,r as i}from"./auth-C_-fMmUL.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-BtNgm5yx.mjs";import{t as c}from"./run-BqAAX99Z.mjs";import"./telemetry-DNHEg6tE.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";import{n as d}from"./prompt-CbKaAX24.mjs";import{t as f}from"./cli-types-DoVT5q_M.mjs";function p(e){return e.usage("$0 scim groups create\n\nCreates a new SCIM Group (user group) for the account. The `displayName` must not be empty and must not begin with `CF` (reserved for system groups).").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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const m={command:`create`,describe:`Create SCIM Group`,builder:p,handler:async d=>c({command:`scim groups create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Groups`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:e,headers:{"Content-Type":`application/scim+json`}})),{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/scim/v2/Groups`,{body:e,headers:{"Content-Type":`application/scim+json`}})),{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function h(e){return e.usage(`$0 scim groups delete <group-id>
3
3
 
4
4
  Deletes a SCIM Group (custom user groups only). System groups backed by Cloudflare permission groups cannot be deleted via SCIM. Returns 204 No Content on success.`).positional(`group-id`,{type:`string`,description:"The group identifier for a SCIM Group resource. For system groups this is prefixed `cloudflare-v1-<permissionGroupTag>`; for custom user groups this is a UUID-style tag.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <group-id>`,describe:`Delete SCIM Group`,builder:h,handler:async r=>c({command:`scim groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf scim groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await d({force:!!r.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
5
5
  `);return}a(await s(`Deleting`,async()=>c.scim.groups.delete({account_id:l,group_id:r[`group-id`]})),{successLabel:`Deleted`})})};function _(e){return e.usage("$0 scim groups edit <group-id>\n\nPartially updates a SCIM Group via PATCH operations (RFC 7644 Section 3.5.2). Supports add, remove, and replace operations on `members`, `displayName`, and `externalId`. For system groups (prefixed `cloudflare-v1-`), only member management operations are supported.").positional(`group-id`,{type:`string`,description:"The group identifier for a SCIM Group resource. For system groups this is prefixed `cloudflare-v1-<permissionGroupTag>`; for custom user groups this is a UUID-style tag.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const v={command:`edit <group-id>`,describe:`Patch SCIM Group`,builder:_,handler:async d=>c({command:`scim groups edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim groups edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Groups/${d[`group-id`]==null?`<group-id>`:encodeURIComponent(String(d[`group-id`]))}`,pathParams:{"group-id":String(d[`group-id`]??``)},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Updating`,async()=>r(c,`PATCH`,`/accounts/${f}/scim/v2/Groups/${encodeURIComponent(String(d[`group-id`]))}`,{body:e,headers:{"Content-Type":`application/scim+json`}})),{successLabel:`Updated`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Updating`,async()=>r(c,`PATCH`,`/accounts/${f}/scim/v2/Groups/${encodeURIComponent(String(d[`group-id`]))}`,{body:e,headers:{"Content-Type":`application/scim+json`}})),{successLabel:`Updated`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function y(e){return e.usage(`$0 scim groups get <group-id>