cf 1.0.0-beta.0 → 1.0.0-beta.2

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 (351) hide show
  1. package/README.md +11 -0
  2. package/dist/_meta/commands.json +10140 -10626
  3. package/dist/_meta/hand-written-commands.json +546 -1
  4. package/dist/_meta/schemas.json +6391 -7002
  5. package/dist/{abuse-reports-BwsJLiPN.mjs → abuse-reports-JcwSaW-c.mjs} +11 -11
  6. package/dist/access-B3TvAe5h.mjs +27 -0
  7. package/dist/{account-DBLarar2.mjs → account-CLsfIk5j.mjs} +5 -5
  8. package/dist/{account-tags-BNrSShjj.mjs → account-tags-BJdDiyDi.mjs} +4 -4
  9. package/dist/{accounts-CCAnDjFk.mjs → accounts-6eXqIqSW.mjs} +59 -59
  10. package/dist/{acm-ZPYQbZQr.mjs → acm-ChNLnPqM.mjs} +3 -3
  11. package/dist/{addressing-BFpzLfTn.mjs → addressing-z8ei_TCh.mjs} +49 -49
  12. package/dist/agent-context-GRiQ4zRU.mjs +2 -0
  13. package/dist/{agent-memory-DEvy2dLU.mjs → agent-memory-Un0usAVF.mjs} +15 -15
  14. package/dist/{ai-BF0_0NtS.mjs → ai-Bj8kgDf7.mjs} +14 -14
  15. package/dist/{ai-audit-Dn03zntn.mjs → ai-audit-FR6QuDK_.mjs} +1 -1
  16. package/dist/{ai-gateway-CVABbCjv.mjs → ai-gateway-DrQhTvKf.mjs} +68 -68
  17. package/dist/{ai-search-g0tR8Cut.mjs → ai-search-BvMeOKK6.mjs} +37 -37
  18. package/dist/{ai-security-BXXA0Jnk.mjs → ai-security-BHvDKoM1.mjs} +1 -1
  19. package/dist/{alerting-Bst10SOG.mjs → alerting-DmRZCAjg.mjs} +26 -26
  20. package/dist/{analytics-DgEaxta8.mjs → analytics-DqidJ4qc.mjs} +9 -9
  21. package/dist/{analytics_engine-B4DvcYmB.mjs → analytics_engine-I7N0I6yP.mjs} +2 -2
  22. package/dist/{api-security-Dkx1Codr.mjs → api-security-BMNhdDyR.mjs} +61 -61
  23. package/dist/{argo-BvswWPlP.mjs → argo-U5TIBcub.mjs} +1 -1
  24. package/dist/args-CXgkQKK7.mjs +2 -0
  25. package/dist/{artifacts-D8kZKJq0.mjs → artifacts-Byw1W73U.mjs} +20 -20
  26. package/dist/{audit-logs-Bp_yQpXJ.mjs → audit-logs-C6zyFeKM.mjs} +2 -2
  27. package/dist/auth-B5p3SIhO.mjs +8 -0
  28. package/dist/auth-CosaKfuk.mjs +2 -0
  29. package/dist/autoconfig-DED3bWob.mjs +511 -0
  30. package/dist/banner-Xk4xBN8U.mjs +2 -0
  31. package/dist/{billing-Cqj64fqz.mjs → billing-BS1raRJt.mjs} +10 -10
  32. package/dist/{bot-management-CzZx_aml.mjs → bot-management-Cn6xfGzJ.mjs} +1 -1
  33. package/dist/{botnet-feed-Co0c8Xdj.mjs → botnet-feed-DtWOPNfw.mjs} +5 -5
  34. package/dist/{brand-protection-CDsGaPIl.mjs → brand-protection-BcEQ66bT.mjs} +13 -13
  35. package/dist/browser-extension-D_siSsD9.mjs +2 -0
  36. package/dist/{browser-run-DFrohJ1p.mjs → browser-run-RZ7ZPRop.mjs} +23 -23
  37. package/dist/build-DG8NfVjJ.mjs +2 -0
  38. package/dist/build-kgS7iKwi.mjs +2 -0
  39. package/dist/{builds-CamhClyb.mjs → builds-AOCMH4CE.mjs} +31 -31
  40. package/dist/{cache-BiTk4-Zc.mjs → cache-D_EBxDff.mjs} +1 -1
  41. package/dist/{certificate-authorities-Dal9DNjW.mjs → certificate-authorities-B6rtjuaT.mjs} +1 -1
  42. package/dist/cf--3tGe71B.mjs +18 -0
  43. package/dist/chunk-M77HNR46-BqG3fjQz.mjs +2 -0
  44. package/dist/chunk-RV27PEH3-C8_6bMgi.mjs +97 -0
  45. package/dist/chunk-U6NEESU5-CAnOLcsu.mjs +2 -0
  46. package/dist/chunk-WMOON6TZ-D3H84qpM.mjs +2 -0
  47. package/dist/cli-Ct980dyx.mjs +3 -0
  48. package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
  49. package/dist/client-certificates-uBOjGcgo.mjs +13 -0
  50. package/dist/{client-side-security-CIO_YPtN.mjs → client-side-security-Bm7JwGaG.mjs} +1 -1
  51. package/dist/{cloud-connector-vwdixea0.mjs → cloud-connector-69M2Dx8h.mjs} +1 -1
  52. package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-Ba5LySkU.mjs} +1 -1
  53. package/dist/{cloudforce-one-C1cFVBGK.mjs → cloudforce-one-Xn2mlAPv.mjs} +214 -214
  54. package/dist/command-B7SzqjQM.mjs +2 -0
  55. package/dist/command-BLHcNQ8m.mjs +2 -0
  56. package/dist/command-BxQbIQWT.mjs +2 -0
  57. package/dist/command-C0SMCHZp.mjs +2 -0
  58. package/dist/command-CE8k5TuK.mjs +2 -0
  59. package/dist/command-CPiCDUth.mjs +2 -0
  60. package/dist/command-Cb0pS8T5.mjs +2 -0
  61. package/dist/command-Cz_bKDWf.mjs +2 -0
  62. package/dist/command-DCpX9Cem.mjs +2 -0
  63. package/dist/command-DEC5PwJo.mjs +2 -0
  64. package/dist/command-DHjsstFb.mjs +2 -0
  65. package/dist/command-MTUsmZU5.mjs +2 -0
  66. package/dist/command-Sb9lOxWT.mjs +2 -0
  67. package/dist/command-sQ8yswii.mjs +2 -0
  68. package/dist/{completions-xPLd1cvL.mjs → completions-DZDltM9V.mjs} +3 -3
  69. package/dist/{config-B4vIa0zp.mjs → config-DcppJ5D2.mjs} +1 -1
  70. package/dist/{connector-interrupts-DQ5T-HMN.mjs → connector-interrupts-DTy6laab.mjs} +3 -3
  71. package/dist/{connector-telemetry-events-DWam38_9.mjs → connector-telemetry-events-CJqGGvFJ.mjs} +3 -3
  72. package/dist/{connector-telemetry-snapshots-DX6AJf9Q.mjs → connector-telemetry-snapshots-BPxhPhr6.mjs} +3 -3
  73. package/dist/{connectors-CBhLWVd-.mjs → connectors-CdfCcZuA.mjs} +7 -7
  74. package/dist/{containers-Bx_44bmJ.mjs → containers-C7z53QcY.mjs} +86 -86
  75. package/dist/{containers-C7blN-pe.mjs → containers-VMqcxH5a.mjs} +17 -17
  76. package/dist/{content-scan-CC91dAlv.mjs → content-scan-BirgZrmr.mjs} +1 -1
  77. package/dist/context-Dzzbc9RK.mjs +7 -0
  78. package/dist/{cps-D9a4N_bH.mjs → cps-DzFm3zKp.mjs} +1 -1
  79. package/dist/{csamScanner-T7nbCnep.mjs → csamScanner-D2_OO5-1.mjs} +1 -1
  80. package/dist/{ct-alerting-CkjNJlla.mjs → ct-alerting-B7wQkFVl.mjs} +1 -1
  81. package/dist/{custom-certificates-DnWnt9oJ.mjs → custom-certificates-BKcCfbH8.mjs} +4 -4
  82. package/dist/{custom-csrs-Db2pF9Ib.mjs → custom-csrs-CXoOxir4.mjs} +5 -5
  83. package/dist/{custom-hostnames-B_N-uSIa.mjs → custom-hostnames-CNYfnCOd.mjs} +6 -6
  84. package/dist/{custom-nameservers-DPA_sFY8.mjs → custom-nameservers-BlLM7a4L.mjs} +5 -5
  85. package/dist/{custom-pages-D6fxEBoh.mjs → custom-pages-BcWoypet.mjs} +10 -10
  86. package/dist/{d1-DXs1xVmH.mjs → d1-CvrHsqYY.mjs} +14 -14
  87. package/dist/{data-security-CVZAIzhe.mjs → data-security-BxzLSdGk.mjs} +33 -33
  88. package/dist/{dcv-delegation-as1ue_wx.mjs → dcv-delegation-9_Hl-5v-.mjs} +1 -1
  89. package/dist/{delegate-GctF_lrq.mjs → delegate-CCGgla7X.mjs} +1 -1
  90. package/dist/delegate.mjs +1 -1
  91. package/dist/{deploy-D2XXCkqk.mjs → deploy-BlXYtvTd.mjs} +1 -1
  92. package/dist/{deploy-input-BCYyKXpp.mjs → deploy-input-DTXVZ2QJ.mjs} +1 -1
  93. package/dist/dev-reqdKM28.mjs +4 -0
  94. package/dist/{diagnostics-BKH1Oh-C.mjs → diagnostics-BxHs1EJB.mjs} +7 -7
  95. package/dist/dialog-ClHoC_cG.mjs +2 -0
  96. package/dist/dist-CmyJy57B.mjs +48 -0
  97. package/dist/{dist-BpadEMNY.mjs → dist-Cpb7_h4N.mjs} +35 -35
  98. package/dist/dist-cGGV-p_F.mjs +366 -0
  99. package/dist/{dls-C5kAQsN6.mjs → dls-D7GXW-N3.mjs} +8 -8
  100. package/dist/{dns-CYwXrdJO.mjs → dns-B0mdWJO5.mjs} +63 -63
  101. package/dist/{dns-firewall-BEw4QcXj.mjs → dns-firewall-BG0bzuL3.mjs} +8 -8
  102. package/dist/dot-prop-IITUZ2XW-BO5KJUwL.mjs +2 -0
  103. package/dist/dry-run-BmzTxDtZ.mjs +2 -0
  104. package/dist/{durable-objects-3jvUgzKd.mjs → durable-objects-DW0CsJzR.mjs} +4 -4
  105. package/dist/{email-auth-B3MD8FrJ.mjs → email-auth-Ls-7Yijm.mjs} +1 -1
  106. package/dist/{email-routing-C4YhZGPw.mjs → email-routing-DVaFhg-3.mjs} +24 -24
  107. package/dist/{email-security-BcFyWNby.mjs → email-security-vnwkqlgp.mjs} +77 -79
  108. package/dist/{email-sending-BO1GOAho.mjs → email-sending-CbMUicJz.mjs} +23 -23
  109. package/dist/error-sanitization-TV6O0aCD.mjs +2 -0
  110. package/dist/error-sanitization-cyGBhW1Z.mjs +2 -0
  111. package/dist/{fieldExtractors-BJDnzNCN.mjs → fieldExtractors-2EkDoJg8.mjs} +4 -4
  112. package/dist/firewall-BK4QYqRe.mjs +36 -0
  113. package/dist/{flagship-BJYMb7hb.mjs → flagship--lHQ0H3n.mjs} +13 -13
  114. package/dist/{fraud-C7kS7kP9.mjs → fraud-CaoRrQ8W.mjs} +1 -1
  115. package/dist/generate-CrKNH6ms.mjs +3 -0
  116. package/dist/generate-Djb5Af37.mjs +2 -0
  117. package/dist/{google-tag-gateway-8VR-j0sa.mjs → google-tag-gateway-DDzLPmk5.mjs} +1 -1
  118. package/dist/{healthchecks-BJleItOD.mjs → healthchecks-Q2uXvt4m.mjs} +1 -1
  119. package/dist/{hostnames-CHajvoHa.mjs → hostnames-CsaYnis6.mjs} +1 -1
  120. package/dist/{hyperdrive-DlxQrok-.mjs → hyperdrive-DDr6sAkw.mjs} +9 -9
  121. package/dist/{iam-B7oTr6vW.mjs → iam-CmzocepZ.mjs} +24 -24
  122. package/dist/{images-xLAYe436.mjs → images-Ux0Phsbi.mjs} +38 -38
  123. package/dist/index.mjs +1 -1
  124. package/dist/init-Nx4RRgfT.mjs +39 -0
  125. package/dist/{intel-DwZXY1YE.mjs → intel-bgS4g7nx.mjs} +38 -38
  126. package/dist/interactive-B_dcVghB.mjs +2 -0
  127. package/dist/interactive-D80kbTap.mjs +32 -0
  128. package/dist/{ips-BC_9nKE7.mjs → ips-BDiolgWF.mjs} +1 -1
  129. package/dist/keyless-certificates-C_TwTMql.mjs +13 -0
  130. package/dist/{keys-K-GFzhku.mjs → keys-Cr8AqQDY.mjs} +2 -2
  131. package/dist/{kv-Bfwz_ULu.mjs → kv-DmAQCqXl.mjs} +10 -10
  132. package/dist/lazy-command-B_bwSa2F.mjs +2 -0
  133. package/dist/{leaked-credential-checks-D8UuxztO.mjs → leaked-credential-checks-De7ph4VA.mjs} +1 -1
  134. package/dist/{load-balancers-B0XeGLhT.mjs → load-balancers-DXt4ndF4.mjs} +39 -39
  135. package/dist/local-CFd107fr.mjs +2 -0
  136. package/dist/{local-B6b2OIBW.mjs → local-OKXweFsd.mjs} +1 -1
  137. package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-tTYpniPS.mjs} +1 -1
  138. package/dist/login-BurQ63Ws.mjs +5 -0
  139. package/dist/login-CmlHvH5k.mjs +2 -0
  140. package/dist/{logo-matches-DWg5ezsM.mjs → logo-matches-CQ60P96J.mjs} +3 -3
  141. package/dist/{logos-6A6gJC5C.mjs → logos-u7UwT8MH.mjs} +3 -3
  142. package/dist/{logpush-DwehajAw.mjs → logpush-IoIe8e80.mjs} +23 -23
  143. package/dist/{logs-BWg7YymF.mjs → logs-ih5tyXEE.mjs} +16 -16
  144. package/dist/{magic-cloud-networking--14hNj2F.mjs → magic-cloud-networking-CWNFnjcY.mjs} +34 -34
  145. package/dist/{magic-network-monitoring-Dzo4L6kd.mjs → magic-network-monitoring-ClfZleF8.mjs} +17 -17
  146. package/dist/{magic-transit-DDO0A5v4.mjs → magic-transit-D69pkEVW.mjs} +139 -139
  147. package/dist/{managed-defense-DQ0iwWdG.mjs → managed-defense-BHdmL0vx.mjs} +9 -9
  148. package/dist/{managed-transforms-DDIdcPG0.mjs → managed-transforms-DbCR4LUg.mjs} +1 -1
  149. package/dist/{matches-D6ahHNaP.mjs → matches-Cou6RVkh.mjs} +3 -3
  150. package/dist/{mcp-BcIrLbRv.mjs → mcp-CQYfM19s.mjs} +15 -15
  151. package/dist/{mesh-wLiPcWyN.mjs → mesh-CXqaAFS4.mjs} +12 -12
  152. package/dist/migrate-CXMbQPyC.mjs +2 -0
  153. package/dist/mtls-certificates-DNeId8xS.mjs +13 -0
  154. package/dist/{network-DZsrs_sw.mjs → network-B7V3JbU7.mjs} +24 -24
  155. package/dist/{network-interconnects-Cjbu4EMv.mjs → network-interconnects-BNon8iUs.mjs} +17 -17
  156. package/dist/oauth-CeXh-ACI.mjs +9 -0
  157. package/dist/{oauth-Cu1twz9z.mjs → oauth-DM8q-TYg.mjs} +1 -1
  158. package/dist/{oauth-clients-DR0hzakz.mjs → oauth-clients-gGmWIWHl.mjs} +7 -7
  159. package/dist/{oauth-scopes-BDNpJJ32.mjs → oauth-scopes-DSEu331u.mjs} +1 -1
  160. package/dist/{observability-BnHy2M6p.mjs → observability-_VJhfwM1.mjs} +44 -44
  161. package/dist/open-PCXX3ZDZ-DobJT1Mj.mjs +4 -0
  162. package/dist/{organization-iasRm69J.mjs → organization-DW4EpwGl.mjs} +1 -1
  163. package/dist/{organizations-CUzCIKXV.mjs → organizations-DE1g2wVq.mjs} +1 -1
  164. package/dist/{origin-ca-certificates-iQXSqBI0.mjs → origin-ca-certificates-D3ULDV__.mjs} +3 -3
  165. package/dist/{origin-post-quantum-encryption-DcMDK6Tz.mjs → origin-post-quantum-encryption-BLropaz7.mjs} +1 -1
  166. package/dist/{origin-tls-client-auth-D1X26X7y.mjs → origin-tls-client-auth-C87TG2i_.mjs} +5 -5
  167. package/dist/output-CZt-berV.mjs +2 -0
  168. package/dist/{page-rules-CXa8EYcP.mjs → page-rules-tlb9P-7V.mjs} +1 -1
  169. package/dist/{pages-Cu0m9GSH.mjs → pages-CjPErYik.mjs} +24 -24
  170. package/dist/{pay-per-crawl-DmF8xlm_.mjs → pay-per-crawl-C50wI-Iz.mjs} +32 -32
  171. package/dist/{pay-per-use-DIp2fwJU.mjs → pay-per-use-DHHIvynU.mjs} +3 -3
  172. package/dist/{pipelines-MmXlsxYO.mjs → pipelines-Y2icOwuf.mjs} +20 -20
  173. package/dist/precursor-DeyurJSC.mjs +4 -0
  174. package/dist/previews-Dj_LcGRd.mjs +4 -0
  175. package/dist/progress-C9dWgc3J.mjs +2 -0
  176. package/dist/prompt-Mh69ni1N.mjs +3 -0
  177. package/dist/{queries-VzdcSR5H.mjs → queries-DyUJefwL.mjs} +4 -4
  178. package/dist/{queues-BZYl2emH.mjs → queues-CdNe4tGY.mjs} +29 -35
  179. package/dist/{r2-omcKF8_A.mjs → r2-C0W2J4sT.mjs} +52 -52
  180. package/dist/{r2-data-catalog-DISnPFPY.mjs → r2-data-catalog-D_zDlmVD.mjs} +16 -16
  181. package/dist/{radar-JzBTD249.mjs → radar-CSguicKC.mjs} +1 -1
  182. package/dist/raw-fetch-1ygCOcT_.mjs +2 -0
  183. package/dist/{realtime-yIdAJ0Yf.mjs → realtime-CvWs5pi3.mjs} +78 -78
  184. package/dist/{registrar-D-Li9gNk.mjs → registrar-DQUxn0FK.mjs} +8 -8
  185. package/dist/{registrar-sandbox-CKSSHAyv.mjs → registrar-sandbox-Q7ZEmg2x.mjs} +6 -6
  186. package/dist/{registry-vreNkX6u.mjs → registry-4Sw95M5_.mjs} +1 -1
  187. package/dist/{reporting-Cf-pnw6h.mjs → reporting-DJShxeDv.mjs} +7 -7
  188. package/dist/request-headers-DFBBErJg.mjs +2 -0
  189. package/dist/{request-tracers-BegIQTzt.mjs → request-tracers-DD8HlG61.mjs} +2 -2
  190. package/dist/resolve-BVxXAYG7.mjs +2 -0
  191. package/dist/{resource-sharing-DEVgiYzM.mjs → resource-sharing-J46JMWQP.mjs} +14 -14
  192. package/dist/{resource-tagging-Cm2yJkU9.mjs → resource-tagging-DLZJLIqy.mjs} +2 -2
  193. package/dist/{rules-DDCa7cYF.mjs → rules-D068LfBR.mjs} +8 -8
  194. package/dist/{rulesets-BhS7Hvtu.mjs → rulesets-Cz6P7Oje.mjs} +17 -17
  195. package/dist/{rum-EIj9ViSn.mjs → rum-C6GQC2vI.mjs} +14 -14
  196. package/dist/run-C_qUgBTs.mjs +2 -0
  197. package/dist/run-DK1d9BJz.mjs +2 -0
  198. package/dist/schema-VZPw_2CY.mjs +2 -0
  199. package/dist/{schema-flags--GosoCMU.mjs → schema-flags-BmY0Nzp0.mjs} +2 -2
  200. package/dist/{scim-DA83eNe-.mjs → scim-DMTp_Zhc.mjs} +10 -10
  201. package/dist/{sdk-CvIO3tWS.mjs → sdk-BuF3fTHr.mjs} +2 -2
  202. package/dist/{secrets-store-BTd3eGIB.mjs → secrets-store-C2epk0sQ.mjs} +11 -11
  203. package/dist/{security-center-DbH_7h-T.mjs → security-center-DwMdQ02Y.mjs} +15 -15
  204. package/dist/{security-txt-DSrHhVEN.mjs → security-txt-CORQfMul.mjs} +1 -1
  205. package/dist/session-BEXskZi2.mjs +2 -0
  206. package/dist/shared--lvrXmXY.mjs +2 -0
  207. package/dist/{smart-shield-DnSTo-OI.mjs → smart-shield-BZ0xjy_6.mjs} +1 -1
  208. package/dist/{snippets-An5kQs33.mjs → snippets-LSkJGDOc.mjs} +1 -1
  209. package/dist/source-38bULAR8.mjs +6 -0
  210. package/dist/spawn-Da3HnlmB.mjs +10 -0
  211. package/dist/{spectrum-Ci79n7fd.mjs → spectrum-zU8_GFTV.mjs} +1 -1
  212. package/dist/{speed-BBL7LrLn.mjs → speed-4XbFmeYM.mjs} +1 -1
  213. package/dist/src-BLLpnbzC.mjs +109 -0
  214. package/dist/{ssl-B2psFIRm.mjs → ssl-DiCsMY_a.mjs} +4 -4
  215. package/dist/startup-profile-6fCkD04r.mjs +17 -0
  216. package/dist/startup-profile-Cw-_akjQ.mjs +2 -0
  217. package/dist/state-CcktNox9.mjs +2 -0
  218. package/dist/{state-BxCejn42.mjs → state-DiHwKWTy.mjs} +1 -1
  219. package/dist/{stream-Du0Q7UOh.mjs → stream-BG3NUAVE.mjs} +45 -45
  220. package/dist/{submit-CU8S2jBT.mjs → submit-CKSaSFS1.mjs} +2 -2
  221. package/dist/{tags-C3l5aZSi.mjs → tags-uT9Mi-bX.mjs} +2 -2
  222. package/dist/telemetry-C0k8vfbq.mjs +2 -0
  223. package/dist/telemetry-Dh-8kdfY.mjs +5 -0
  224. package/dist/{telemetry-PHe8XxA2.mjs → telemetry-IrDBqbQW.mjs} +1 -1
  225. package/dist/{tenant-BZ0ysR9L.mjs → tenant--UrYFHM0.mjs} +1 -1
  226. package/dist/{tenant-custom-nameservers-DtKeyM5J.mjs → tenant-custom-nameservers-8Z4TVJtr.mjs} +1 -1
  227. package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
  228. package/dist/tools-DNGD0l7I.mjs +2 -0
  229. package/dist/{tunnels-D1tRWQQi.mjs → tunnels-5lGSXYpl.mjs} +15 -15
  230. package/dist/turnstile-CT3AkMPV.mjs +33 -0
  231. package/dist/ui-D1hhIDIs.mjs +5 -0
  232. package/dist/update-check-BYJnL8J8.mjs +2 -0
  233. package/dist/update-check-DFoSm5GT.mjs +2 -0
  234. package/dist/update-check-worker.mjs +1 -1
  235. package/dist/{url-info-BRA0XGT2.mjs → url-info-DvpNcNl8.mjs} +2 -2
  236. package/dist/{url-normalization-B6N2m5s6.mjs → url-normalization-C9URZnpq.mjs} +1 -1
  237. package/dist/{url-scanner-CeKkzkhe.mjs → url-scanner-CIwK3wB5.mjs} +8 -8
  238. package/dist/{user-CftksgmF.mjs → user-DGA7cqdf.mjs} +1 -1
  239. package/dist/{values-m7w9PX3o.mjs → values-BzS0b25w.mjs} +2 -2
  240. package/dist/{vectorize-BWBEtsgZ.mjs → vectorize-DtDjl2fJ.mjs} +15 -15
  241. package/dist/version-B47pK_PZ.mjs +2 -0
  242. package/dist/{waiting-rooms-BVZSYTNJ.mjs → waiting-rooms-CjTh4F3B.mjs} +25 -25
  243. package/dist/{web-assets-CLU5vAgP.mjs → web-assets-4l1B5V9b.mjs} +1 -1
  244. package/dist/{web3-Dkd4XRNH.mjs → web3-C0Z4AJjC.mjs} +1 -1
  245. package/dist/{workers-BQi4_SBS.mjs → workers-CNBv6GxE.mjs} +20 -20
  246. package/dist/{workers-builds-BgtPSDYJ.mjs → workers-builds-DYGeoxmX.mjs} +7 -7
  247. package/dist/{workers-for-platforms-actLCM6Q.mjs → workers-for-platforms-CSw0K8Nl.mjs} +11 -11
  248. package/dist/{workers-vpc-DjGfJgQn.mjs → workers-vpc-DJ7Couct.mjs} +6 -6
  249. package/dist/{workflows-Cm7WsAgB.mjs → workflows-Dm03QT8U.mjs} +20 -20
  250. package/dist/{zaraz-DurWe32F.mjs → zaraz-DJbWUUe3.mjs} +1 -1
  251. package/dist/zero-trust-DiMY-pN5.mjs +685 -0
  252. package/dist/{zone-B3AEAfcd.mjs → zone-BWjBv1yy.mjs} +1 -1
  253. package/dist/{zones-DiX5LoSU.mjs → zones-zGqcQvcY.mjs} +1 -1
  254. package/dist/zt-Bt4Q6iM1.mjs +110 -0
  255. package/package.json +13 -11
  256. package/dist/access-BVbIajYr.mjs +0 -27
  257. package/dist/auth-B9w55oRg.mjs +0 -2
  258. package/dist/auth-C80y97yu.mjs +0 -8
  259. package/dist/browser-extension-BRHJm3Qf.mjs +0 -15
  260. package/dist/build-BbjcJxKq.mjs +0 -2
  261. package/dist/build-DQh5-KK4.mjs +0 -2
  262. package/dist/cf-oadujOtC.mjs +0 -18
  263. package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
  264. package/dist/chunk-DL5FNmn1.mjs +0 -2
  265. package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
  266. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
  267. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
  268. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
  269. package/dist/client-certificates-DDisXoTE.mjs +0 -13
  270. package/dist/command-BP7ldws1.mjs +0 -2
  271. package/dist/command-BtNRBTP6.mjs +0 -2
  272. package/dist/command-CF0giIIc.mjs +0 -3
  273. package/dist/command-Ck9rbHA4.mjs +0 -2
  274. package/dist/dev-nsNxyg2D.mjs +0 -4
  275. package/dist/dialog-Dx4rRcKM.mjs +0 -2
  276. package/dist/dist-BDOzKthe.mjs +0 -48
  277. package/dist/dist-dc4E1u01.mjs +0 -272
  278. package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
  279. package/dist/dry-run-CLX6Pbtq.mjs +0 -2
  280. package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
  281. package/dist/error-sanitization-DOlqWkNu.mjs +0 -2
  282. package/dist/firewall-BSMa9aH3.mjs +0 -56
  283. package/dist/interactive-B6woOLo-.mjs +0 -32
  284. package/dist/interactive-DnUvQHjc.mjs +0 -2
  285. package/dist/keyless-certificates-CtsCsbZ2.mjs +0 -13
  286. package/dist/local-BrfySqnx.mjs +0 -2
  287. package/dist/login-CAsRUF4c.mjs +0 -2
  288. package/dist/login-DaglE6WA.mjs +0 -5
  289. package/dist/mtls-certificates-AEuNOERQ.mjs +0 -13
  290. package/dist/oauth-C-QCVfWz.mjs +0 -14
  291. package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
  292. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
  293. package/dist/output-Bia1u2k5.mjs +0 -2
  294. package/dist/precursor-jqeEG_mJ.mjs +0 -4
  295. package/dist/previews-Cg6lc24N.mjs +0 -4
  296. package/dist/progress-Bpp73hIu.mjs +0 -2
  297. package/dist/prompt-CpZztV8c.mjs +0 -3
  298. package/dist/raw-fetch-DxGs_eRm.mjs +0 -2
  299. package/dist/request-headers-DaXBfmVn.mjs +0 -2
  300. package/dist/resolve-BXemCSyA.mjs +0 -2
  301. package/dist/run-CSFE1qVX.mjs +0 -2
  302. package/dist/run-ChM_YpZ0.mjs +0 -2
  303. package/dist/schema-DCBb3Fcs.mjs +0 -2
  304. package/dist/shared-CtBkOWGN.mjs +0 -2
  305. package/dist/source-BR4_k2ad.mjs +0 -6
  306. package/dist/spawn-7IW1UyoH.mjs +0 -523
  307. package/dist/src-CNHNCZpy.mjs +0 -108
  308. package/dist/startup-profile-CYEokTVe.mjs +0 -2
  309. package/dist/startup-profile-CgWHy4rE.mjs +0 -17
  310. package/dist/state-DSzkxXML.mjs +0 -2
  311. package/dist/telemetry-CNt8H3aA.mjs +0 -2
  312. package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
  313. package/dist/tools-BMKpYraQ.mjs +0 -2
  314. package/dist/turnstile-DBa4_Vyz.mjs +0 -33
  315. package/dist/ui-DH95w1Qk.mjs +0 -5
  316. package/dist/undici-DTSBJHNS.mjs +0 -96
  317. package/dist/update-check-AAn7EXw8.mjs +0 -2
  318. package/dist/update-check-BbIXBq1o.mjs +0 -2
  319. package/dist/version-cPq-WKL8.mjs +0 -2
  320. package/dist/zero-trust-D8SVU8YZ.mjs +0 -795
  321. /package/dist/{Page-C-JHZnIy.mjs → Page-BchtVjAO.mjs} +0 -0
  322. /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
  323. /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
  324. /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-BpPZBRMr.mjs} +0 -0
  325. /package/dist/{brands-BHRXlWDm.mjs → brands-Uy0Cmv1w.mjs} +0 -0
  326. /package/dist/{clear-UvKESVx3.mjs → clear-CpcO2ExU.mjs} +0 -0
  327. /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-B6tm-8uL.mjs} +0 -0
  328. /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-oguk5Zyj.mjs} +0 -0
  329. /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-B6zuxkr0.mjs} +0 -0
  330. /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
  331. /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
  332. /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-D3e278L_.mjs} +0 -0
  333. /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
  334. /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
  335. /package/dist/{live-D_k7eHdv.mjs → live-a01OfPf9.mjs} +0 -0
  336. /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
  337. /package/dist/{project-settings-DSXevRvj.mjs → project-settings-Bf6rReo1.mjs} +0 -0
  338. /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-Bw9qmxMx.mjs} +0 -0
  339. /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CDm_xzKt.mjs} +0 -0
  340. /package/dist/{ready-CvwvbdTX.mjs → ready-BXGqY1Wi.mjs} +0 -0
  341. /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-AhGZD3a3.mjs} +0 -0
  342. /package/dist/{refute-CIAFMj00.mjs → refute-D_w5Gw20.mjs} +0 -0
  343. /package/dist/{resolve-CUDKxUrW.mjs → resolve-qPFfBMrn.mjs} +0 -0
  344. /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-BZzFam-Q.mjs} +0 -0
  345. /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-BPA8nSPM.mjs} +0 -0
  346. /package/dist/{search-12jA1b4l.mjs → search-De0UlXYN.mjs} +0 -0
  347. /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ziDz9frX.mjs} +0 -0
  348. /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-83D2DCCG.mjs} +0 -0
  349. /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-Dhol31Kn.mjs} +0 -0
  350. /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-DoOPs6Vd.mjs} +0 -0
  351. /package/dist/{verify-CZW5Fo1q.mjs → verify-CxpGEnJb.mjs} +0 -0
@@ -1,30 +1,30 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{n as f}from"./prompt-CpZztV8c.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 rum rules bulk-create
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{n as f}from"./prompt-Mh69ni1N.mjs";import{t as p}from"./cli-types-B6tm-8uL.mjs";function m(e){return e.usage(`$0 rum rules bulk-create
3
3
 
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 n()??`<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 t();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>
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
 
6
- Creates a new rule in a Web Analytics ruleset.`).positional(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`host`,{type:`string`,description:`The host field`}).option(`inclusive`,{type:`boolean`,description:`Whether the rule includes or excludes traffic from being measured.`}).option(`is-paused`,{type:`boolean`,description:`Whether the rule is paused or not.`}).option(`paths`,{type:`string`,array:!0,description:`The paths field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create <ruleset-id>`,describe:`Create a Web Analytics rule`,builder:g,handler:async l=>s({command:`rum rules create`,classification:{safeFlags:[`inclusive`,`is-paused`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/v2/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rule`,pathParams:{"ruleset-id":String(l[`ruleset-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rum.rules.create({body:e,account_id:f,ruleset_id:l[`ruleset-id`]})),{successLabel:`Created`});return}let p=u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths});i(await o(`Creating`,async()=>s.rum.rules.create({body:p,account_id:f,ruleset_id:l[`ruleset-id`]})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 rum rules delete <rule-id>
6
+ Creates a new rule in a Web Analytics ruleset.`).positional(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`host`,{type:`string`,description:`The host field`}).option(`inclusive`,{type:`boolean`,description:`Whether the rule includes or excludes traffic from being measured.`}).option(`is-paused`,{type:`boolean`,description:`Whether the rule is paused or not.`}).option(`paths`,{type:`string`,array:!0,description:`The paths field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create <ruleset-id>`,describe:`Create a Web Analytics rule`,builder:g,handler:async l=>s({command:`rum rules create`,classification:{safeFlags:[`inclusive`,`is-paused`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/v2/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rule`,pathParams:{"ruleset-id":String(l[`ruleset-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths}):c(l.body)});return}let s=await r(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rum.rules.create({body:e,account_id:f,ruleset_id:l[`ruleset-id`]})),{successLabel:`Created`});return}let p=u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths});i(await o(`Creating`,async()=>s.rum.rules.create({body:p,account_id:f,ruleset_id:l[`ruleset-id`]})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 rum rules delete <rule-id>
7
7
 
8
- Deletes an existing rule from a Web Analytics ruleset.`).positional(`rule-id`,{type:`string`,description:`The Web Analytics rule identifier.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,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 y={command:`delete <rule-id>`,describe:`Delete a Web Analytics rule`,builder:v,handler:async c=>s({command:`rum rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rum rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/v2/${c[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(c[`ruleset-id`]))}/rule/${c[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(c[`rule-id`]))}`,pathParams:{"ruleset-id":String(c[`ruleset-id`]??``),"rule-id":String(c[`rule-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
8
+ Deletes an existing rule from a Web Analytics ruleset.`).positional(`rule-id`,{type:`string`,description:`The Web Analytics rule identifier.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,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 y={command:`delete <rule-id>`,describe:`Delete a Web Analytics rule`,builder:v,handler:async c=>s({command:`rum rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rum rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/v2/${c[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(c[`ruleset-id`]))}/rule/${c[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(c[`rule-id`]))}`,pathParams:{"ruleset-id":String(c[`ruleset-id`]??``),"rule-id":String(c[`rule-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
9
9
  `);return}i(await o(`Deleting`,async()=>s.rum.rules.delete({account_id:l,ruleset_id:c[`ruleset-id`],rule_id:c[`rule-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 rum rules list
10
10
 
11
- Lists all the rules in a Web Analytics ruleset.`).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List rules in Web Analytics ruleset`,builder:b,handler:async c=>s({command:`rum rules list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/v2/${c[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(c[`ruleset-id`]))}/rules`,pathParams:{"ruleset-id":String(c[`ruleset-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rum.rules.list({account_id:l,ruleset_id:c[`ruleset-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 rum rules update <rule-id>
11
+ Lists all the rules in a Web Analytics ruleset.`).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List rules in Web Analytics ruleset`,builder:b,handler:async c=>s({command:`rum rules list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/v2/${c[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(c[`ruleset-id`]))}/rules`,pathParams:{"ruleset-id":String(c[`ruleset-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rum.rules.list({account_id:l,ruleset_id:c[`ruleset-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 rum rules update <rule-id>
12
12
 
13
- Updates a rule in a Web Analytics ruleset.`).positional(`rule-id`,{type:`string`,description:`The Web Analytics rule identifier.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`host`,{type:`string`,description:`The host field`}).option(`inclusive`,{type:`boolean`,description:`Whether the rule includes or excludes traffic from being measured.`}).option(`is-paused`,{type:`boolean`,description:`Whether the rule is paused or not.`}).option(`paths`,{type:`string`,array:!0,description:`The paths field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <rule-id>`,describe:`Update a Web Analytics rule`,builder:S,handler:async l=>s({command:`rum rules update`,classification:{safeFlags:[`inclusive`,`is-paused`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/v2/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rule/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"ruleset-id":String(l[`ruleset-id`]??``),"rule-id":String(l[`rule-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rum.rules.update({body:e,account_id:f,ruleset_id:l[`ruleset-id`],rule_id:l[`rule-id`]})),{successLabel:`Updated`});return}let p=u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths});i(await o(`Updating`,async()=>s.rum.rules.update({body:p,account_id:f,ruleset_id:l[`ruleset-id`],rule_id:l[`rule-id`]})),{successLabel:`Updated`})})},w={command:`rules`,describe:`Rules that control which pages and paths are tracked by Web Analytics`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 rum site-info create
13
+ Updates a rule in a Web Analytics ruleset.`).positional(`rule-id`,{type:`string`,description:`The Web Analytics rule identifier.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The Web Analytics ruleset identifier.`,demandOption:!0}).option(`host`,{type:`string`,description:`The host field`}).option(`inclusive`,{type:`boolean`,description:`Whether the rule includes or excludes traffic from being measured.`}).option(`is-paused`,{type:`boolean`,description:`Whether the rule is paused or not.`}).option(`paths`,{type:`string`,array:!0,description:`The paths field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <rule-id>`,describe:`Update a Web Analytics rule`,builder:S,handler:async l=>s({command:`rum rules update`,classification:{safeFlags:[`inclusive`,`is-paused`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/v2/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rule/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"ruleset-id":String(l[`ruleset-id`]??``),"rule-id":String(l[`rule-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths}):c(l.body)});return}let s=await r(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rum.rules.update({body:e,account_id:f,ruleset_id:l[`ruleset-id`],rule_id:l[`rule-id`]})),{successLabel:`Updated`});return}let p=u({host:d(l.host,`host`,`text`),inclusive:l.inclusive,is_paused:l[`is-paused`],paths:l.paths});i(await o(`Updating`,async()=>s.rum.rules.update({body:p,account_id:f,ruleset_id:l[`ruleset-id`],rule_id:l[`rule-id`]})),{successLabel:`Updated`})})},w={command:`rules`,describe:`Rules that control which pages and paths are tracked by Web Analytics`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 rum site-info create
14
14
 
15
- Creates a new Web Analytics site.`).option(`auto-install`,{type:`boolean`,description:`If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.`}).option(`host`,{type:`string`,description:`The hostname to use for gray-clouded sites.`}).option(`zone-tag`,{type:`string`,description:`The zone identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`create`,describe:`Create a Web Analytics site`,builder:T,handler:async l=>s({command:`rum site-info create`,classification:{safeFlags:[`auto-install`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum site-info create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({auto_install:l[`auto-install`],host:d(l.host,`host`,`text`),zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rum.siteInfo.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({auto_install:l[`auto-install`],host:d(l.host,`host`,`text`),zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)});i(await o(`Creating`,async()=>s.rum.siteInfo.create({...p,account_id:f})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 rum site-info delete <site-id>
15
+ Creates a new Web Analytics site.`).option(`auto-install`,{type:`boolean`,description:`If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.`}).option(`host`,{type:`string`,description:`The hostname to use for gray-clouded sites.`}).option(`zone-tag`,{type:`string`,description:`The zone identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`create`,describe:`Create a Web Analytics site`,builder:T,handler:async l=>s({command:`rum site-info create`,classification:{safeFlags:[`auto-install`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum site-info create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({auto_install:l[`auto-install`],host:d(l.host,`host`,`text`),zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rum.siteInfo.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({auto_install:l[`auto-install`],host:d(l.host,`host`,`text`),zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)});i(await o(`Creating`,async()=>s.rum.siteInfo.create({...p,account_id:f})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 rum site-info delete <site-id>
16
16
 
17
- Deletes an existing Web Analytics site.`).positional(`site-id`,{type:`string`,description:`Identifier.`,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 O={command:`delete <site-id>`,describe:`Delete a Web Analytics site`,builder:D,handler:async c=>s({command:`rum site-info delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/${c[`site-id`]==null?`<site-id>`:encodeURIComponent(String(c[`site-id`]))}`,pathParams:{"site-id":String(c[`site-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
17
+ Deletes an existing Web Analytics site.`).positional(`site-id`,{type:`string`,description:`Identifier.`,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 O={command:`delete <site-id>`,describe:`Delete a Web Analytics site`,builder:D,handler:async c=>s({command:`rum site-info delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/${c[`site-id`]==null?`<site-id>`:encodeURIComponent(String(c[`site-id`]))}`,pathParams:{"site-id":String(c[`site-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
18
18
  `);return}i(await o(`Deleting`,async()=>s.rum.siteInfo.delete({account_id:l,site_id:c[`site-id`]})),{successLabel:`Deleted`})})};function k(e){return e.usage(`$0 rum site-info get <site-id>
19
19
 
20
- Retrieves a Web Analytics site.`).positional(`site-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <site-id>`,describe:`Get a Web Analytics site`,builder:k,handler:async c=>s({command:`rum site-info get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/${c[`site-id`]==null?`<site-id>`:encodeURIComponent(String(c[`site-id`]))}`,pathParams:{"site-id":String(c[`site-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rum.siteInfo.get({account_id:l,site_id:c[`site-id`]})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 rum site-info list-site-tags
20
+ Retrieves a Web Analytics site.`).positional(`site-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <site-id>`,describe:`Get a Web Analytics site`,builder:k,handler:async c=>s({command:`rum site-info get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/${c[`site-id`]==null?`<site-id>`:encodeURIComponent(String(c[`site-id`]))}`,pathParams:{"site-id":String(c[`site-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rum.siteInfo.get({account_id:l,site_id:c[`site-id`]})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 rum site-info list-site-tags
21
21
 
22
- Returns all site tags for an account as an array of site tag strings. This endpoint returns all results without pagination.`).option(`all`,{type:`boolean`,description:`When true, includes sites that are disabled or paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-site-tags`,describe:`List Web Analytics site tags`,builder:j,handler:async c=>s({command:`rum site-info list-site-tags`,classification:{safeFlags:[`all`,`dry-run`]}},c,async()=>{let s={all:c.all};if(c.dryRun){a({command:`cf rum site-info list-site-tags`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/site_tag/list`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.rum.siteInfo.listSiteTags({account_id:u,...s})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 rum site-info list-zone-tags
22
+ Returns all site tags for an account as an array of site tag strings. This endpoint returns all results without pagination.`).option(`all`,{type:`boolean`,description:`When true, includes sites that are disabled or paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-site-tags`,describe:`List Web Analytics site tags`,builder:j,handler:async c=>s({command:`rum site-info list-site-tags`,classification:{safeFlags:[`all`,`dry-run`]}},c,async()=>{let s={all:c.all};if(c.dryRun){a({command:`cf rum site-info list-site-tags`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/site_tag/list`,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.rum.siteInfo.listSiteTags({account_id:u,...s})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 rum site-info list-zone-tags
23
23
 
24
- Returns all zone tags associated with Web Analytics sites for an account. These can be used to filter or exclude zones in the zone selection input. This endpoint returns all results without pagination.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list-zone-tags`,describe:`List Web Analytics zone tags`,builder:N,handler:async c=>s({command:`rum site-info list-zone-tags`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info list-zone-tags`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/zone_tag/list`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rum.siteInfo.listZoneTags({account_id:l})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 rum site-info list
24
+ Returns all zone tags associated with Web Analytics sites for an account. These can be used to filter or exclude zones in the zone selection input. This endpoint returns all results without pagination.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list-zone-tags`,describe:`List Web Analytics zone tags`,builder:N,handler:async c=>s({command:`rum site-info list-zone-tags`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info list-zone-tags`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/zone_tag/list`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rum.siteInfo.listZoneTags({account_id:l})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 rum site-info list
25
25
 
26
- Lists all Web Analytics sites of an account.`).option(`per-page`,{type:`number`,description:`Number of items to return per page of results.`}).option(`page`,{type:`number`,description:`Current page within the paginated list of results.`}).option(`order-by`,{type:`string`,description:`The property used to sort the list of results.`,choices:[`host`,`created`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List Web Analytics sites`,builder:p(F),handler:async c=>s({command:`rum site-info list`,classification:{safeFlags:[`order-by`,`dry-run`]}},c,async()=>{let s={per_page:c[`per-page`],page:c.page,order_by:c[`order-by`]};if(c.dryRun){a({command:`cf rum site-info list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/list`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.rum.siteInfo.list({account_id:u,...s})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 rum site-info update <site-id>
26
+ Lists all Web Analytics sites of an account.`).option(`per-page`,{type:`number`,description:`Number of items to return per page of results.`}).option(`page`,{type:`number`,description:`Current page within the paginated list of results.`}).option(`order-by`,{type:`string`,description:`The property used to sort the list of results.`,choices:[`host`,`created`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List Web Analytics sites`,builder:p(F),handler:async c=>s({command:`rum site-info list`,classification:{safeFlags:[`order-by`,`dry-run`]}},c,async()=>{let s={per_page:c[`per-page`],page:c.page,order_by:c[`order-by`]};if(c.dryRun){a({command:`cf rum site-info list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/list`,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.rum.siteInfo.list({account_id:u,...s})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 rum site-info update <site-id>
27
27
 
28
- Updates an existing Web Analytics site.`).positional(`site-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`auto-install`,{type:`boolean`,description:`If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.`}).option(`enabled`,{type:`boolean`,description:`Enables or disables RUM. This option can be used only when auto_install is set to true.`}).option(`host`,{type:`string`,description:`The hostname to use for gray-clouded sites.`}).option(`lite`,{type:`boolean`,description:`If enabled, the JavaScript snippet will not be injected for visitors from the EU.`}).option(`zone-tag`,{type:`string`,description:`The zone identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`update <site-id>`,describe:`Update a Web Analytics site`,builder:L,handler:async l=>s({command:`rum site-info update`,classification:{safeFlags:[`auto-install`,`enabled`,`lite`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum site-info update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/${l[`site-id`]==null?`<site-id>`:encodeURIComponent(String(l[`site-id`]))}`,pathParams:{"site-id":String(l[`site-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({auto_install:l[`auto-install`],enabled:l.enabled,host:d(l.host,`host`,`text`),lite:l.lite,zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rum.siteInfo.update({...e,account_id:f,site_id:l[`site-id`]})),{successLabel:`Updated`});return}let p=u({auto_install:l[`auto-install`],enabled:l.enabled,host:d(l.host,`host`,`text`),lite:l.lite,zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)});i(await o(`Updating`,async()=>s.rum.siteInfo.update({...p,account_id:f,site_id:l[`site-id`]})),{successLabel:`Updated`})})};function z(e){return e.usage(`$0 rum site-info validate-hostname <hostname>
28
+ Updates an existing Web Analytics site.`).positional(`site-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`auto-install`,{type:`boolean`,description:`If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.`}).option(`enabled`,{type:`boolean`,description:`Enables or disables RUM. This option can be used only when auto_install is set to true.`}).option(`host`,{type:`string`,description:`The hostname to use for gray-clouded sites.`}).option(`lite`,{type:`boolean`,description:`If enabled, the JavaScript snippet will not be injected for visitors from the EU.`}).option(`zone-tag`,{type:`string`,description:`The zone identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`update <site-id>`,describe:`Update a Web Analytics site`,builder:L,handler:async l=>s({command:`rum site-info update`,classification:{safeFlags:[`auto-install`,`enabled`,`lite`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rum site-info update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/${l[`site-id`]==null?`<site-id>`:encodeURIComponent(String(l[`site-id`]))}`,pathParams:{"site-id":String(l[`site-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({auto_install:l[`auto-install`],enabled:l.enabled,host:d(l.host,`host`,`text`),lite:l.lite,zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rum.siteInfo.update({...e,account_id:f,site_id:l[`site-id`]})),{successLabel:`Updated`});return}let p=u({auto_install:l[`auto-install`],enabled:l.enabled,host:d(l.host,`host`,`text`),lite:l.lite,zone_tag:d(l[`zone-tag`],`zone-tag`,`text`)});i(await o(`Updating`,async()=>s.rum.siteInfo.update({...p,account_id:f,site_id:l[`site-id`]})),{successLabel:`Updated`})})};function z(e){return e.usage(`$0 rum site-info validate-hostname <hostname>
29
29
 
30
- Validates that the provided hostname is well-formed, does not contain wildcards, and has a valid TLD. Returns an empty result on success.`).positional(`hostname`,{type:`string`,description:"The hostname to validate (e.g. example.com). The `pattern` below validates the hostname's structure (label syntax) only. In addition, the hostname must end in a valid public suffix (TLD). For the list of valid suffixes and how it is used, see the Public Suffix List: https://wiki.mozilla.org/Public_Suffix_List/Use_Cases",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`validate-hostname <hostname>`,describe:`Validate a Web Analytics site hostname`,builder:z,handler:async c=>s({command:`rum site-info validate-hostname`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info validate-hostname`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rum/site_info/validate/${c.hostname==null?`<hostname>`:encodeURIComponent(String(c.hostname))}`,pathParams:{hostname:String(c.hostname??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rum.siteInfo.validateHostname({account_id:l,hostname:c.hostname})),{successLabel:`Loaded`})})},V={command:`site-info`,describe:`Web Analytics sites — register domains and get the JavaScript beacon snippet`,builder:e=>e.command(E).command(O).command(A).command(I).command(M).command(P).command(R).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`rum`,describe:`Real User Measurement (Web Analytics) — track page loads, Core Web Vitals, and visitor metrics`,builder:e=>e.command(w).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
30
+ Validates that the provided hostname is well-formed, does not contain wildcards, and has a valid TLD. Returns an empty result on success.`).positional(`hostname`,{type:`string`,description:"The hostname to validate (e.g. example.com). The `pattern` below validates the hostname's structure (label syntax) only. In addition, the hostname must end in a valid public suffix (TLD). For the list of valid suffixes and how it is used, see the Public Suffix List: https://wiki.mozilla.org/Public_Suffix_List/Use_Cases",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`validate-hostname <hostname>`,describe:`Validate a Web Analytics site hostname`,builder:z,handler:async c=>s({command:`rum site-info validate-hostname`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rum site-info validate-hostname`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rum/site_info/validate/${c.hostname==null?`<hostname>`:encodeURIComponent(String(c.hostname))}`,pathParams:{hostname:String(c.hostname??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rum.siteInfo.validateHostname({account_id:l,hostname:c.hostname})),{successLabel:`Loaded`})})},V={command:`site-info`,describe:`Web Analytics sites — register domains and get the JavaScript beacon snippet`,builder:e=>e.command(E).command(O).command(A).command(I).command(M).command(P).command(R).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`rum`,describe:`Real User Measurement (Web Analytics) — track page loads, Core Web Vitals, and visitor metrics`,builder:e=>e.command(w).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./run-DK1d9BJz.mjs";export{e as runWithTelemetry};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./agent-context-GRiQ4zRU.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{n}from"./version-B47pK_PZ.mjs";import{t as r}from"./delegate-CCGgla7X.mjs";import{i,r as a}from"./lifecycle-Cyc3fmyN.mjs";import{i as o,t as s}from"./interactive-D80kbTap.mjs";import{t as c}from"./request-headers-DFBBErJg.mjs";import{i as l,o as u,s as d}from"./config-DcppJ5D2.mjs";import{t as f}from"./error-sanitization-TV6O0aCD.mjs";import p from"node:os";function m(){switch(process.platform){case`win32`:return`Windows`;case`darwin`:return`Mac OS`;case`linux`:return`Linux`;default:return`Others: ${process.platform}`}}function h(){return p.version()}function g(){return process.arch}function _(){return Number.parseInt(process.versions.node.split(`.`)[0]??`0`,10)}function v(){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 y(){return e().harness?.id??null}function b(){return typeof PACKAGE_PRERELEASE_LABEL==`string`?PACKAGE_PRERELEASE_LABEL:void 0}let x;function S(){if(x)return x;let[e,t,a]=n.split(`.`).map(e=>{let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}),f=Date.now(),p=0,S=u(),{enabled:C}=d(),w=y();function T(){let i=b();return{product:`cf`,cliVersion:n,cliMajor:e??0,cliMinor:t??0,cliPatch:a??0,...i?{prereleaseLabel:i}:{},osPlatform:m(),osVersion:h(),arch:g(),nodeVersion:_(),packageManager:v(),deviceId:l(),amplitude_session_id:f,amplitude_event_id:p++,isFirstUsage:S,isCI:s,isInteractive:o(),cliMode:c(),agent:w,delegated:!!process.env[r]}}function E(e,t){let n={deviceId:t.deviceId,event:e,timestamp:Date.now(),properties:t};process.env.DEBUG&&console.error(`Telemetry would send: ${JSON.stringify(n)}`)}return x={enabled:C,sendCommandEvent(e,t){if(C)try{i(E(e,{...T(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}},sendAdhocEvent(e,t={}){if(C)try{i(E(e,{...T(),...t}))}catch(e){process.env.DEBUG&&console.error(`Telemetry failed to prepare:`,e)}}},x}const C={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 w(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function T(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 E(e,t,n){let r=new Set([...n.safeFlags,`quiet`,`local`]),i={...C,...n.shortFlagAliases},a=new Set,o={};for(let n of T(t,i)){a.add(n);let t=e[n]??e[w(n)];o[n]=r.has(n)?t:`<REDACTED>`}let s=[...a].sort();return{sanitizedArgs:o,argsUsed:s,argsCombination:s.join(`, `)}}const D=new Set([`SIGINT`,`SIGTERM`]);function O(e){if(e instanceof t)return e.cancelled||e.signal&&D.has(e.signal)?`cancelled`:e.code===0?`success`:`error`}async function k(e,t,n){let r;try{r=S()}catch{return n()}if(a(),e.sendMetrics===!1||!r.enabled)return n();let i={...e.recordArgs===!1?{sanitizedArgs:{},argsUsed:[],argsCombination:``}:E(t,process.argv.slice(2),e.classification),command:e.command};r.sendCommandEvent(`cf command started`,i);let o=Date.now();try{let e=await n();return r.sendCommandEvent(`cf command finished`,{...i,outcome:`success`,durationMs:Date.now()-o}),e}catch(e){let t=O(e)??`error`;throw r.sendCommandEvent(`cf command finished`,{...i,outcome:t,durationMs:Date.now()-o,...t===`error`?f(e):{}}),e}}function A(e,t){return{...e,handler:n=>k(t,n,()=>e.handler(n))}}export{S as i,A as n,E as r,k as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./metadata-C33s4rc-.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{t as n}from"./output-CZt-berV.mjs";function r(e){return typeof e==`object`&&!!e&&`version`in e&&`schemas`in e&&typeof e.version==`string`&&typeof e.schemas==`object`}const i={command:`schema [command..]`,describe:`Show API schema details for a command`,builder:e=>e.positional(`command`,{describe:`Command path segments (e.g., dns records create)`,type:`string`,array:!0,default:[]}).option(`list`,{type:`boolean`,describe:`List all available schemas`,default:!1}),handler:async i=>{let a=e(import.meta.url,`schemas.json`,r);if(!a)throw console.error("Error: Could not load schemas.json. Run `pnpm generate` first."),new t(1);if(i.list){n(Object.entries(a.schemas).map(([e,t])=>({command:`cf ${e}`,httpMethod:t.httpMethod,apiPath:t.path,operationId:t.operationId})));return}if(i.command.length===0)throw console.error(`Usage: cf schema <command...> or cf schema --list`),console.error(`Example: cf schema dns records create`),new t(1);let o=i.command.join(` `),s=a.schemas[o];if(!s){let e=Object.keys(a.schemas).filter(e=>e.includes(o)||o.includes(e));if(e.length>0){console.error(`Schema not found for "${o}". Did you mean:`);for(let t of e)console.error(` cf schema ${t}`)}else console.error(`Schema not found for "${o}". Use --list to see available schemas.`);throw new t(1)}n(s)}};export{i as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./version-cPq-WKL8.mjs";import{a as t}from"./theme-BiIYWOed.mjs";import{i as n}from"./cf-oadujOtC.mjs";import{i as r}from"./body-parser-CUWbw_Tq.mjs";import{n as i}from"./input-validation-Ch4Vllrm.mjs";import{o as a}from"./prompt-CpZztV8c.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(t,r){let i=f(`sha256`).update([e,...r].join(` `)).digest(`hex`).slice(0,32);return u(n(),`cache`,t,`${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-B47pK_PZ.mjs";import{i as n}from"./cf--3tGe71B.mjs";import{i as r}from"./body-parser-BpPZBRMr.mjs";import{n as i}from"./input-validation-D3e278L_.mjs";import{o as a}from"./prompt-Mh69ni1N.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
- `)[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(e,n){if(e.length===0)return`${t.brand(a(n))}\n (no input fields)`;let r=process.stdout.columns??80,i=e.map(e=>`--${a(e.name)}`),o=Math.min(Math.max(...i.map(e=>e.length))+2,42),s=e.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[t.brand(a(n)),...s].join(`
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,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";import{n as d}from"./prompt-CpZztV8c.mjs";import{t as f}from"./cli-types-tt_LZMbn.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 n()??`<account-id>`}/scim/v2/Groups`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();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-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,t as u}from"./input-validation-D3e278L_.mjs";import{n as d}from"./prompt-Mh69ni1N.mjs";import{t as f}from"./cli-types-B6tm-8uL.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
- 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 n()??`<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 t();if(r.accountId=l,!await d({force:!!r.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
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 n()??`<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 t();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>
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
+ `);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>
6
6
 
7
- Retrieves a single SCIM Group resource by group ID.`).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})}const b={command:`get <group-id>`,describe:`Get SCIM Group`,builder:y,handler:async r=>c({command:`scim groups get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.groups.get({account_id:l,group_id:r[`group-id`]})),{successLabel:`Loaded`})})};function x(e){return e.usage("$0 scim groups list\n\nLists SCIM Group resources for the account. Returns both system groups (backed by Cloudflare permission groups, prefixed `cloudflare-v1-`) and custom user groups. Supports filtering by `displayName` using SCIM filter syntax.").option(`start-index`,{type:`number`,description:`The 1-based index of the first result in the current set of list results. Values less than 1 are treated as 1.`}).option(`count`,{type:`number`,description:`Specifies the desired maximum number of query results per page.`}).option(`filter`,{type:`string`,description:'SCIM filter expression (RFC 7644 Section 3.4.2.2). Only `displayName eq "value"` is supported.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List SCIM Groups`,builder:x,handler:async r=>c({command:`scim groups list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={startIndex:r[`start-index`],count:r.count,filter:r.filter};if(r.dryRun){o({command:`cf scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Groups`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.scim.groups.list({account_id:u,...c})),{successLabel:`Loaded`})})};function C(e){return e.usage("$0 scim groups update <group-id>\n\nReplaces the mutable attributes of a SCIM Group (RFC 7644 Section 3.5.1), including its complete member set. Omitting `externalId` clears it, and omitting `members` replaces the member set with an empty list. For system groups (prefixed `cloudflare-v1-`), only the member set is replaced.").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 w={command:`update <group-id>`,describe:`Replace SCIM Group`,builder:C,handler:async d=>c({command:`scim groups update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Updating`,async()=>r(c,`PUT`,`/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,`PUT`,`/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.`)})},T={command:`groups`,describe:`Groups operations`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage("$0 scim resource-types get <resource-type-id>\n\nReturns a single SCIM resource type by ID (RFC 7643 Section 6). Valid IDs are `User` and `Group`.").positional(`resource-type-id`,{type:`string`,description:`The resource type identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <resource-type-id>`,describe:`Get SCIM Resource Type`,builder:f(E),handler:async r=>c({command:`scim resource-types get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim resource-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/ResourceTypes/${r[`resource-type-id`]==null?`<resource-type-id>`:encodeURIComponent(String(r[`resource-type-id`]))}`,pathParams:{"resource-type-id":String(r[`resource-type-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.resourceTypes.get({account_id:l,resource_type_id:r[`resource-type-id`]})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 scim resource-types list
7
+ Retrieves a single SCIM Group resource by group ID.`).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})}const b={command:`get <group-id>`,describe:`Get SCIM Group`,builder:y,handler:async r=>c({command:`scim groups get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim groups get`,method:`GET`,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();r.accountId=l,a(await s(`Loading`,async()=>c.scim.groups.get({account_id:l,group_id:r[`group-id`]})),{successLabel:`Loaded`})})};function x(e){return e.usage("$0 scim groups list\n\nLists SCIM Group resources for the account. Returns both system groups (backed by Cloudflare permission groups, prefixed `cloudflare-v1-`) and custom user groups. Supports filtering by `displayName` using SCIM filter syntax.").option(`start-index`,{type:`number`,description:`The 1-based index of the first result in the current set of list results. Values less than 1 are treated as 1.`}).option(`count`,{type:`number`,description:`Specifies the desired maximum number of query results per page.`}).option(`filter`,{type:`string`,description:'SCIM filter expression (RFC 7644 Section 3.4.2.2). Only `displayName eq "value"` is supported.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List SCIM Groups`,builder:x,handler:async r=>c({command:`scim groups list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={startIndex:r[`start-index`],count:r.count,filter:r.filter};if(r.dryRun){o({command:`cf scim groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Groups`,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.scim.groups.list({account_id:u,...c})),{successLabel:`Loaded`})})};function C(e){return e.usage("$0 scim groups update <group-id>\n\nReplaces the mutable attributes of a SCIM Group (RFC 7644 Section 3.5.1), including its complete member set. Omitting `externalId` clears it, and omitting `members` replaces the member set with an empty list. For system groups (prefixed `cloudflare-v1-`), only the member set is replaced.").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 w={command:`update <group-id>`,describe:`Replace SCIM Group`,builder:C,handler:async d=>c({command:`scim groups update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim groups update`,method:`PUT`,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,`PUT`,`/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,`PUT`,`/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.`)})},T={command:`groups`,describe:`Groups operations`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage("$0 scim resource-types get <resource-type-id>\n\nReturns a single SCIM resource type by ID (RFC 7643 Section 6). Valid IDs are `User` and `Group`.").positional(`resource-type-id`,{type:`string`,description:`The resource type identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <resource-type-id>`,describe:`Get SCIM Resource Type`,builder:f(E),handler:async r=>c({command:`scim resource-types get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim resource-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/ResourceTypes/${r[`resource-type-id`]==null?`<resource-type-id>`:encodeURIComponent(String(r[`resource-type-id`]))}`,pathParams:{"resource-type-id":String(r[`resource-type-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.scim.resourceTypes.get({account_id:l,resource_type_id:r[`resource-type-id`]})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 scim resource-types list
8
8
 
9
- Returns the list of SCIM resource types supported by the Cloudflare SCIM service (RFC 7643 Section 6, RFC 7644 Section 4). Clients use this to discover available resource categories (e.g. Users, Groups) and their associated schemas. Query parameters are not supported on this endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List SCIM Resource Types`,builder:O,handler:async r=>c({command:`scim resource-types list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim resource-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/ResourceTypes`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.resourceTypes.list({account_id:l})),{successLabel:`Loaded`})})},A={command:`resource-types`,describe:`Resource Types operations`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage("$0 scim schemas get <schema-id>\n\nReturns a single SCIM schema definition by schema URI ID (RFC 7643 Section 7). Valid IDs are `urn:ietf:params:scim:schemas:core:2.0:User` and `urn:ietf:params:scim:schemas:core:2.0:Group`.").positional(`schema-id`,{type:`string`,description:`The schema URI identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <schema-id>`,describe:`Get SCIM Schema`,builder:j,handler:async r=>c({command:`scim schemas get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim schemas get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Schemas/${r[`schema-id`]==null?`<schema-id>`:encodeURIComponent(String(r[`schema-id`]))}`,pathParams:{"schema-id":String(r[`schema-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.schemas.get({account_id:l,schema_id:r[`schema-id`]})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 scim schemas list
9
+ Returns the list of SCIM resource types supported by the Cloudflare SCIM service (RFC 7643 Section 6, RFC 7644 Section 4). Clients use this to discover available resource categories (e.g. Users, Groups) and their associated schemas. Query parameters are not supported on this endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List SCIM Resource Types`,builder:O,handler:async r=>c({command:`scim resource-types list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim resource-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/ResourceTypes`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.scim.resourceTypes.list({account_id:l})),{successLabel:`Loaded`})})},A={command:`resource-types`,describe:`Resource Types operations`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage("$0 scim schemas get <schema-id>\n\nReturns a single SCIM schema definition by schema URI ID (RFC 7643 Section 7). Valid IDs are `urn:ietf:params:scim:schemas:core:2.0:User` and `urn:ietf:params:scim:schemas:core:2.0:Group`.").positional(`schema-id`,{type:`string`,description:`The schema URI identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <schema-id>`,describe:`Get SCIM Schema`,builder:j,handler:async r=>c({command:`scim schemas get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim schemas get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Schemas/${r[`schema-id`]==null?`<schema-id>`:encodeURIComponent(String(r[`schema-id`]))}`,pathParams:{"schema-id":String(r[`schema-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.scim.schemas.get({account_id:l,schema_id:r[`schema-id`]})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 scim schemas list
10
10
 
11
- Returns the list of SCIM schemas supported by the Cloudflare SCIM service (RFC 7643 Section 7, RFC 7644 Section 4). Clients use this to introspect the attributes of each resource type. Query parameters are not supported on this endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List SCIM Schemas`,builder:N,handler:async r=>c({command:`scim schemas list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Schemas`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.schemas.list({account_id:l})),{successLabel:`Loaded`})})},F={command:`schemas`,describe:`Schemas operations`,builder:e=>e.command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.usage(`$0 scim service-provider-config get
11
+ Returns the list of SCIM schemas supported by the Cloudflare SCIM service (RFC 7643 Section 7, RFC 7644 Section 4). Clients use this to introspect the attributes of each resource type. Query parameters are not supported on this endpoint.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List SCIM Schemas`,builder:N,handler:async r=>c({command:`scim schemas list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Schemas`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.scim.schemas.list({account_id:l})),{successLabel:`Loaded`})})},F={command:`schemas`,describe:`Schemas operations`,builder:e=>e.command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.usage(`$0 scim service-provider-config get
12
12
 
13
- Returns the SCIM 2.0 Service Provider configuration (RFC 7643 Section 5). IdPs use this endpoint to auto-configure their SCIM integration with Cloudflare, discovering which optional features (patch, bulk, filter, etc.) are supported.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get`,describe:`Get SCIM Service Provider Config`,builder:I,handler:async r=>c({command:`scim service-provider-config get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim service-provider-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/ServiceProviderConfig`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.serviceProviderConfig.get({account_id:l})),{successLabel:`Loaded`})})},R={command:`service-provider-config`,describe:`Service Provider Config operations`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage("$0 scim users create\n\nProvisions a new account member via SCIM. The `userName` field must be a valid email address and must match the primary email in `emails`. The account must be an Enterprise account with SCIM entitlements enabled.").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 B={command:`create`,describe:`Create SCIM User`,builder:z,handler:async d=>c({command:`scim users create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Users`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/scim/v2/Users`,{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/Users`,{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 V(e){return e.usage(`$0 scim users delete <user-id>
13
+ Returns the SCIM 2.0 Service Provider configuration (RFC 7643 Section 5). IdPs use this endpoint to auto-configure their SCIM integration with Cloudflare, discovering which optional features (patch, bulk, filter, etc.) are supported.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get`,describe:`Get SCIM Service Provider Config`,builder:I,handler:async r=>c({command:`scim service-provider-config get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim service-provider-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/ServiceProviderConfig`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.scim.serviceProviderConfig.get({account_id:l})),{successLabel:`Loaded`})})},R={command:`service-provider-config`,describe:`Service Provider Config operations`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage("$0 scim users create\n\nProvisions a new account member via SCIM. The `userName` field must be a valid email address and must match the primary email in `emails`. The account must be an Enterprise account with SCIM entitlements enabled.").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 B={command:`create`,describe:`Create SCIM User`,builder:z,handler:async d=>c({command:`scim users create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim users create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Users`,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/Users`,{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/Users`,{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 V(e){return e.usage(`$0 scim users delete <user-id>
14
14
 
15
- Deprovisions a SCIM User by removing their membership from this account (RFC 7644 Section 3.6). This does not delete the global Cloudflare user.`).positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,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 H={command:`delete <user-id>`,describe:`Delete SCIM User`,builder:V,handler:async r=>c({command:`scim users delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf scim users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Users/${r[`user-id`]==null?`<user-id>`:encodeURIComponent(String(r[`user-id`]))}`,pathParams:{"user-id":String(r[`user-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await d({force:!!r.force,message:`Are you sure you want to remove this user from the account?`})){process.stderr.write(`Aborted.
16
- `);return}a(await s(`Deleting`,async()=>c.scim.users.delete({account_id:l,user_id:r[`user-id`]})),{successLabel:`Deleted`})})};function U(e){return e.usage('$0 scim users edit <user-id>\n\nPartially updates a SCIM User via PATCH operations (RFC 7644 Section 3.5.2). Supports updating `userName`, `name.givenName`, `name.familyName`, and `active`. Setting `active: false` deprovisions the user (removes them from the account). For IdP compatibility, `emails[type eq "work"].value` is also accepted as an alias for `userName`.').positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,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 W={command:`edit <user-id>`,describe:`Patch SCIM User`,builder:U,handler:async d=>c({command:`scim users edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim users edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Users/${d[`user-id`]==null?`<user-id>`:encodeURIComponent(String(d[`user-id`]))}`,pathParams:{"user-id":String(d[`user-id`]??``)},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Updating`,async()=>r(c,`PATCH`,`/accounts/${f}/scim/v2/Users/${encodeURIComponent(String(d[`user-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/Users/${encodeURIComponent(String(d[`user-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 G(e){return e.usage(`$0 scim users get <user-id>
15
+ Deprovisions a SCIM User by removing their membership from this account (RFC 7644 Section 3.6). This does not delete the global Cloudflare user.`).positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,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 H={command:`delete <user-id>`,describe:`Delete SCIM User`,builder:V,handler:async r=>c({command:`scim users delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf scim users delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Users/${r[`user-id`]==null?`<user-id>`:encodeURIComponent(String(r[`user-id`]))}`,pathParams:{"user-id":String(r[`user-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 you want to remove this user from the account?`})){process.stderr.write(`Aborted.
16
+ `);return}a(await s(`Deleting`,async()=>c.scim.users.delete({account_id:l,user_id:r[`user-id`]})),{successLabel:`Deleted`})})};function U(e){return e.usage('$0 scim users edit <user-id>\n\nPartially updates a SCIM User via PATCH operations (RFC 7644 Section 3.5.2). Supports updating `userName`, `name.givenName`, `name.familyName`, and `active`. Setting `active: false` deprovisions the user (removes them from the account). For IdP compatibility, `emails[type eq "work"].value` is also accepted as an alias for `userName`.').positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,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 W={command:`edit <user-id>`,describe:`Patch SCIM User`,builder:U,handler:async d=>c({command:`scim users edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim users edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Users/${d[`user-id`]==null?`<user-id>`:encodeURIComponent(String(d[`user-id`]))}`,pathParams:{"user-id":String(d[`user-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/Users/${encodeURIComponent(String(d[`user-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/Users/${encodeURIComponent(String(d[`user-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 G(e){return e.usage(`$0 scim users get <user-id>
17
17
 
18
- Retrieves a single account member as a SCIM User resource by user tag.`).positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <user-id>`,describe:`Get SCIM User`,builder:G,handler:async r=>c({command:`scim users get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Users/${r[`user-id`]==null?`<user-id>`:encodeURIComponent(String(r[`user-id`]))}`,pathParams:{"user-id":String(r[`user-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.scim.users.get({account_id:l,user_id:r[`user-id`]})),{successLabel:`Loaded`})})};function q(e){return e.usage('$0 scim users list\n\nLists account members as SCIM User resources. Supports optional filtering by `userName` (email) using the SCIM filter syntax (e.g. `userName eq "user@example.com"`). Pagination is controlled via `startIndex` and `count` query parameters per RFC 7644 Section 3.4.2.4.').option(`start-index`,{type:`number`,description:`The 1-based index of the first result in the current set of list results. Values less than 1 are treated as 1.`}).option(`count`,{type:`number`,description:`Specifies the desired maximum number of query results per page.`}).option(`filter`,{type:`string`,description:'SCIM filter expression (RFC 7644 Section 3.4.2.2). Only `userName eq "value"` is supported.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List SCIM Users`,builder:q,handler:async r=>c({command:`scim users list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={startIndex:r[`start-index`],count:r.count,filter:r.filter};if(r.dryRun){o({command:`cf scim users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Users`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.scim.users.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Y(e){return e.usage("$0 scim users update <user-id>\n\nReplaces a SCIM User resource (RFC 7644 Section 3.5.1). Fully replaces the mutable attributes of the user. Supports updating `userName`, `name`, `emails`, and `active`.").positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,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 X={command:`update <user-id>`,describe:`Replace SCIM User`,builder:Y,handler:async d=>c({command:`scim users update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim users update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/scim/v2/Users/${d[`user-id`]==null?`<user-id>`:encodeURIComponent(String(d[`user-id`]))}`,pathParams:{"user-id":String(d[`user-id`]??``)},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${f}/scim/v2/Users/${encodeURIComponent(String(d[`user-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,`PUT`,`/accounts/${f}/scim/v2/Users/${encodeURIComponent(String(d[`user-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.`)})},Z={command:`users`,describe:`Users operations`,builder:e=>e.command(B).command(H).command(W).command(K).command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`scim`,describe:`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,builder:e=>e.command(T).command(A).command(F).command(R).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Q as default};
18
+ Retrieves a single account member as a SCIM User resource by user tag.`).positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <user-id>`,describe:`Get SCIM User`,builder:G,handler:async r=>c({command:`scim users get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf scim users get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Users/${r[`user-id`]==null?`<user-id>`:encodeURIComponent(String(r[`user-id`]))}`,pathParams:{"user-id":String(r[`user-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.scim.users.get({account_id:l,user_id:r[`user-id`]})),{successLabel:`Loaded`})})};function q(e){return e.usage('$0 scim users list\n\nLists account members as SCIM User resources. Supports optional filtering by `userName` (email) using the SCIM filter syntax (e.g. `userName eq "user@example.com"`). Pagination is controlled via `startIndex` and `count` query parameters per RFC 7644 Section 3.4.2.4.').option(`start-index`,{type:`number`,description:`The 1-based index of the first result in the current set of list results. Values less than 1 are treated as 1.`}).option(`count`,{type:`number`,description:`Specifies the desired maximum number of query results per page.`}).option(`filter`,{type:`string`,description:'SCIM filter expression (RFC 7644 Section 3.4.2.2). Only `userName eq "value"` is supported.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List SCIM Users`,builder:q,handler:async r=>c({command:`scim users list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={startIndex:r[`start-index`],count:r.count,filter:r.filter};if(r.dryRun){o({command:`cf scim users list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Users`,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.scim.users.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Y(e){return e.usage("$0 scim users update <user-id>\n\nReplaces a SCIM User resource (RFC 7644 Section 3.5.1). Fully replaces the mutable attributes of the user. Supports updating `userName`, `name`, `emails`, and `active`.").positional(`user-id`,{type:`string`,description:`The user tag identifying a SCIM User resource (account member).`,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 X={command:`update <user-id>`,describe:`Replace SCIM User`,builder:Y,handler:async d=>c({command:`scim users update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf scim users update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/scim/v2/Users/${d[`user-id`]==null?`<user-id>`:encodeURIComponent(String(d[`user-id`]))}`,pathParams:{"user-id":String(d[`user-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,`PUT`,`/accounts/${f}/scim/v2/Users/${encodeURIComponent(String(d[`user-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,`PUT`,`/accounts/${f}/scim/v2/Users/${encodeURIComponent(String(d[`user-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.`)})},Z={command:`users`,describe:`Users operations`,builder:e=>e.command(B).command(H).command(W).command(K).command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`scim`,describe:`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,builder:e=>e.command(T).command(A).command(F).command(R).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Q as default};