cf 1.0.0-beta.20 → 1.0.0-beta.21

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 (290) hide show
  1. package/README.md +1 -1
  2. package/dist/_meta/commands.json +911 -751
  3. package/dist/_meta/schemas.json +401 -382
  4. package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
  5. package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
  6. package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
  7. package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
  8. package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
  9. package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
  10. package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
  11. package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
  12. package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
  13. package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
  14. package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
  15. package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
  16. package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
  17. package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
  18. package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
  19. package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
  20. package/dist/args-BAOHroBC.mjs +2 -0
  21. package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
  22. package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
  23. package/dist/auth-B0lEsD_1.mjs +2 -0
  24. package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
  25. package/dist/auth-BtZmY6sE.mjs +2 -0
  26. package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
  27. package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
  28. package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
  29. package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
  30. package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
  31. package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
  32. package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
  33. package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
  34. package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
  35. package/dist/build-BqGmiORA.mjs +2 -0
  36. package/dist/build-CWlpWVBf.mjs +2 -0
  37. package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
  38. package/dist/cache-Bme_d2Wx.mjs +36 -0
  39. package/dist/cf-fIBhEAxU.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
  41. package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
  42. package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
  43. package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
  44. package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
  45. package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
  46. package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
  47. package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
  48. package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
  49. package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
  50. package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
  51. package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
  52. package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
  53. package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
  54. package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
  55. package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
  56. package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
  57. package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
  58. package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
  59. package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
  60. package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
  61. package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
  62. package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
  63. package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
  64. package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
  67. package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
  68. package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
  69. package/dist/containers-CzAZfmnj.mjs +380 -0
  70. package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
  71. package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
  72. package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
  73. package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
  74. package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
  75. package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
  76. package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
  77. package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
  78. package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
  79. package/dist/delegate-D7yYckA4.mjs +2 -0
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
  82. package/dist/deploy-context-Do89WayB.mjs +56 -0
  83. package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
  84. package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
  85. package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
  86. package/dist/dialog-D5lus4M4.mjs +2 -0
  87. package/dist/discover-6kAmVMPp.mjs +2 -0
  88. package/dist/discover-C06Syc2B.mjs +2 -0
  89. package/dist/dist-BtzWfAjU.mjs +453 -0
  90. package/dist/dls-ClWVxTBg.mjs +16 -0
  91. package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
  92. package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
  93. package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
  94. package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
  95. package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
  96. package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
  97. package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
  98. package/dist/email-domains-1rD1d84O.mjs +12 -0
  99. package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
  100. package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
  101. package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
  102. package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
  103. package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
  104. package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
  105. package/dist/flagship-D3v6iDdw.mjs +24 -0
  106. package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
  107. package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
  108. package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
  109. package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
  110. package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
  111. package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
  112. package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-CVx0Ya1E.mjs +43 -0
  115. package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
  116. package/dist/interactive-CHcvofEp.mjs +2 -0
  117. package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
  118. package/dist/interactive-wQM7Blhm.mjs +2 -0
  119. package/dist/internal-5cnlw9mH.mjs +4 -0
  120. package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
  121. package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
  122. package/dist/kv-CCem2sEY.mjs +12 -0
  123. package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
  125. package/dist/live-BhHzxFna.mjs +4 -0
  126. package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
  127. package/dist/local-CAs8RWYW.mjs +2 -0
  128. package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
  129. package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
  130. package/dist/log-BWdaOGOW.mjs +66 -0
  131. package/dist/log-DZfik9Jk.mjs +2 -0
  132. package/dist/login-BTiflOun.mjs +2 -0
  133. package/dist/login-Buhvx6Fi.mjs +5 -0
  134. package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
  135. package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
  136. package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
  137. package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
  138. package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
  139. package/dist/managed-defense-CtFLuvuB.mjs +18 -0
  140. package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
  141. package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
  142. package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
  143. package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
  144. package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
  145. package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
  146. package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
  147. package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
  148. package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
  149. package/dist/oauth-D_A8AcIS.mjs +4 -0
  150. package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
  151. package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
  152. package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
  153. package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
  154. package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
  155. package/dist/output-BJEgbI0G.mjs +2 -0
  156. package/dist/package-BqSbnt6u.mjs +2 -0
  157. package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
  158. package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
  159. package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
  160. package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
  161. package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
  162. package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
  163. package/dist/previews-DnZbUTym.mjs +6 -0
  164. package/dist/progress-CtGsPOpV.mjs +2 -0
  165. package/dist/prompt-YrI7ltMa.mjs +4 -0
  166. package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
  167. package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
  168. package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
  169. package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
  170. package/dist/ready-Cok0aqke.mjs +4 -0
  171. package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
  172. package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
  173. package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
  174. package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
  175. package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
  176. package/dist/request-headers-KhW_hy36.mjs +2 -0
  177. package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
  178. package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
  179. package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
  180. package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
  181. package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
  182. package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
  183. package/dist/run-Be6Js7D6.mjs +2 -0
  184. package/dist/run-DnZGQbq_.mjs +2 -0
  185. package/dist/sanitization-DkVWMHkc.mjs +2 -0
  186. package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
  187. package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
  188. package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
  189. package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
  190. package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
  191. package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
  192. package/dist/session-6xqrJWXy.mjs +2 -0
  193. package/dist/shared-DYRRG9A-.mjs +2 -0
  194. package/dist/signed-url-Ce0muRem.mjs +4 -0
  195. package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
  196. package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
  197. package/dist/spawn-BAEdy9kS.mjs +5 -0
  198. package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
  199. package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
  200. package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
  201. package/dist/src-COwxoocl.mjs +2 -0
  202. package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
  203. package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
  204. package/dist/startup-profile-CZYtQziF.mjs +2 -0
  205. package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
  206. package/dist/state-B3Uy1jPX.mjs +2 -0
  207. package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
  208. package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
  209. package/dist/tags-BP25qydR.mjs +22 -0
  210. package/dist/telemetry-CvZean4s.mjs +2 -0
  211. package/dist/telemetry-DKSJSLtq.mjs +2 -0
  212. package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
  213. package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
  214. package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
  215. package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
  216. package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
  217. package/dist/ui-Bo6DCvbS.mjs +2 -0
  218. package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
  219. package/dist/update-check-C7mfEeQ7.mjs +2 -0
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
  222. package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
  223. package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
  224. package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
  225. package/dist/version-DmTuWNZ5.mjs +2 -0
  226. package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
  227. package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
  228. package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
  229. package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
  230. package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
  231. package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
  232. package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
  233. package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
  234. package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
  235. package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
  236. package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
  237. package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
  238. package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
  239. package/package.json +12 -12
  240. package/dist/auth-CdEGiJ5Y.mjs +0 -2
  241. package/dist/auth-DF_ml7rE.mjs +0 -2
  242. package/dist/build-BJHRK6qE.mjs +0 -2
  243. package/dist/build-D7s3a8zW.mjs +0 -2
  244. package/dist/cache-CDPUUv_O.mjs +0 -45
  245. package/dist/cf-3vj8dGYz.mjs +0 -18
  246. package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
  247. package/dist/containers-CcZHRM9g.mjs +0 -376
  248. package/dist/delegate-Tgfxa-MZ.mjs +0 -2
  249. package/dist/deploy-context-DIAl408H.mjs +0 -56
  250. package/dist/dialog-BnIgdgWi.mjs +0 -2
  251. package/dist/discover-DEjUARkU.mjs +0 -2
  252. package/dist/discover-P20XeGBF.mjs +0 -2
  253. package/dist/dist-CX6dDtzj.mjs +0 -449
  254. package/dist/dist-DAeCUX-u.mjs +0 -60
  255. package/dist/dls-CMTrCDjZ.mjs +0 -17
  256. package/dist/flagship-geGDHp9H.mjs +0 -28
  257. package/dist/init-C08hBFYn.mjs +0 -43
  258. package/dist/interactive-pjVqirHx.mjs +0 -2
  259. package/dist/kv-Cd8vbPWK.mjs +0 -15
  260. package/dist/local-CFZtOOxg.mjs +0 -2
  261. package/dist/log-CRbgNbDp.mjs +0 -3
  262. package/dist/login-C3Bahro9.mjs +0 -5
  263. package/dist/login-DvsRxI3E.mjs +0 -2
  264. package/dist/logo-matches-jeNkUxAq.mjs +0 -6
  265. package/dist/logos-pxN5aumY.mjs +0 -7
  266. package/dist/managed-defense-C_KLy4oB.mjs +0 -18
  267. package/dist/matches-DnjBnG-Y.mjs +0 -6
  268. package/dist/oauth-Cf3-g-kk.mjs +0 -4
  269. package/dist/output-CpiIVa7Q.mjs +0 -2
  270. package/dist/previews-oHUiD54J.mjs +0 -7
  271. package/dist/progress-B1dpmxCT.mjs +0 -2
  272. package/dist/prompt-Y5OBwDVE.mjs +0 -4
  273. package/dist/queries-CS0sYfte.mjs +0 -9
  274. package/dist/request-headers-Bg8_Idw3.mjs +0 -2
  275. package/dist/run-0EozpORq.mjs +0 -2
  276. package/dist/run-DKg70Sqf.mjs +0 -2
  277. package/dist/session-3DgztoAI.mjs +0 -2
  278. package/dist/shared-o8saqcSK.mjs +0 -2
  279. package/dist/source-AlTrHNem.mjs +0 -6
  280. package/dist/spawn-BZd__5sj.mjs +0 -10
  281. package/dist/startup-profile-DJsOtbVN.mjs +0 -2
  282. package/dist/state-Dvzl3aSj.mjs +0 -2
  283. package/dist/submit-wJYcQB8d.mjs +0 -4
  284. package/dist/tags-BwFKjaOr.mjs +0 -23
  285. package/dist/telemetry-BczXOpQn.mjs +0 -2
  286. package/dist/telemetry-CE15pfOU.mjs +0 -2
  287. package/dist/ui-CBhKUPys.mjs +0 -2
  288. package/dist/update-check-C3RhhXja.mjs +0 -2
  289. package/dist/url-info-By6VD20A.mjs +0 -4
  290. package/dist/version-izjB0Yrl.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,i,t as a}from"./context-Sgba0fZP.mjs";import{t as o}from"./output-CpiIVa7Q.mjs";import{t as s}from"./dry-run-BBjUQUhR.mjs";import{t as c}from"./progress-B1dpmxCT.mjs";import{t as l}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-Y5OBwDVE.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function te(e){return e.usage(`$0 o11y agents sessions list
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-YrI7ltMa.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function te(e){return e.usage(`$0 o11y agents sessions list
3
3
 
4
4
  Lists sessions in which the specified agent participated, ordered by most recent activity. A session is identified by gen_ai.conversation.id and includes authorized activity from every agent in that conversation during the requested time range. Agent invocation and chat spans without a conversation ID are attributed only when their trace is associated with exactly one observed conversation.`).option(`service`,{type:`string`,description:`Worker service name associated with the participating agent.`,demandOption:!0}).option(`agent`,{type:`string`,description:`Agent name reported in gen_ai.agent.name. The request is limited to conversations in which this service and agent participated.`,demandOption:!0}).option(`from`,{type:`number`,description:`Start of the requested time range, as Unix epoch milliseconds. Values earlier than the 7-day retention boundary are clamped.`,demandOption:!0}).option(`to`,{type:`number`,description:`End of the requested time range, as Unix epoch milliseconds. Must be later than from.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response.`}).option(`per-page`,{type:`number`,description:`Maximum number of items to return. Defaults to 20 and cannot exceed 100.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List Agent sessions`,builder:te,handler:async e=>l({command:`o11y agents sessions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await r();s({command:`cf o11y agents sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/sessions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ee,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions/${t.conversationId}/runs`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents sessions runs <conversationId>
5
5
 
@@ -7,8 +7,7 @@ Lists the traces associated with a session, ordered by most recent activity. The
7
7
 
8
8
  Create a new Workers Observability Telemetry Destination.`).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json.`}).option(`configuration-logpush-dataset`,{type:`string`,description:`The configuration.logpushDataset field`,choices:[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`]}).coerce(`configuration-logpush-dataset`,e=>m(e,`configuration-logpush-dataset`,`text`)).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck 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 oe={command:`create`,describe:`Create Destination`,builder:ae,handler:async e=>l({command:`o11y destinations create`,classification:{safeFlags:[`configuration-logpush-dataset`,`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({configuration:{headers:f(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]):d(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}])});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}]),n=await c(`Creating`,async()=>i.send(x,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`configuration-headers`]===void 0)throw Error(`--configuration-headers is required (or pass --body with this field set).`);if(e[`configuration-logpush-dataset`]===void 0&&(e[`configuration-logpush-dataset`]=await g(`configuration-logpush-dataset`,`The configuration.logpushDataset field`,[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`])),e[`configuration-type`]===void 0&&(e[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),e[`configuration-url`]===void 0&&(e[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await h(`name`,`The name field`));let u=p({configuration:{headers:f(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]),_=await c(`Creating`,async()=>i.send(x,{body:u,account_id:l}));o(_,{successLabel:`Created`})})};var se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 o11y destinations delete <slug>
9
9
 
10
- Delete a Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,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 le={command:`delete <slug>`,describe:`Delete Destination`,builder:ce,handler:async e=>l({command:`o11y destinations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y destinations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations/${e.slug==null?`<slug>`:encodeURIComponent(String(e.slug))}`,pathParams:{slug:String(e.slug??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
11
- `);return}let u=await c(`Deleting`,async()=>i.send(se,{account_id:l,slug:e.slug}));o(u,{successLabel:`Deleted`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,query:[`page`,`perPage`,`order`,`orderBy`],errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 o11y destinations list
10
+ Delete a Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,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 le={command:`delete <slug>`,describe:`Delete Destination`,builder:ce,handler:async e=>l({command:`o11y destinations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y destinations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations/${e.slug==null?`<slug>`:encodeURIComponent(String(e.slug))}`,pathParams:{slug:String(e.slug??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(se,{account_id:l,slug:e.slug}));o(u,{successLabel:`Deleted`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,query:[`page`,`perPage`,`order`,`orderBy`],errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 o11y destinations list
12
11
 
13
12
  List your Workers Observability Telemetry Destinations.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`Get Destinations`,builder:de,handler:async e=>l({command:`o11y destinations list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},e,async()=>{let i={page:e.page,perPage:e[`per-page`],order:e.order,orderBy:e[`order-by`]};if(e.dryRun){let e=await r();s({command:`cf o11y destinations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ue,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function pe(e){return e.usage(`$0 o11y destinations update <slug>
14
13
 
@@ -18,8 +17,7 @@ Add one or more ungrouped issues to an existing issue group.`).positional(`group
18
17
 
19
18
  Create an account or service issue automation.`).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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 O={command:`create`,describe:`Create an issue automation`,builder:D,handler:async e=>l({command:`o11y issues automations create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(E,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e[`policy-id`]===void 0&&(e[`policy-id`]=await h(`policy-id`,`The policyId field`));let u=p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}),f=await c(`Creating`,async()=>i.send(E,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var k={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function A(e){return e.usage(`$0 o11y issues automations delete <automationId>
20
19
 
21
- Delete an issue automation while preserving its historical runs.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,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 j={command:`delete <automationId>`,describe:`Delete an issue automation`,builder:A,handler:async e=>l({command:`o11y issues automations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
22
- `);return}let u=await c(`Deleting`,async()=>i.send(k,{account_id:l,automationId:e[`automation-id`]}));o(u,{successLabel:`Deleted`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function N(e){return e.usage(`$0 o11y issues automations get <automationId>
20
+ Delete an issue automation while preserving its historical runs.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,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 j={command:`delete <automationId>`,describe:`Delete an issue automation`,builder:A,handler:async e=>l({command:`o11y issues automations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(k,{account_id:l,automationId:e[`automation-id`]}));o(u,{successLabel:`Deleted`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function N(e){return e.usage(`$0 o11y issues automations get <automationId>
23
21
 
24
22
  Retrieve an issue automation.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <automationId>`,describe:`Get an issue automation`,builder:N,handler:async e=>l({command:`o11y issues automations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues automations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(M,{account_id:l,automationId:e[`automation-id`]}));o(u,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 o11y issues automations list
25
23
 
@@ -37,13 +35,11 @@ Send the issue to one ANS policy, or every matching Real-Time Issue policy when
37
35
 
38
36
  List the retained error occurrences grouped into an issue, newest first.`).positional(`issue-id`,{type:`string`,description:`Issue ID returned by the issues API.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor returned in result_info.cursors.after.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`occurrences <issueId>`,describe:`List issue occurrences`,builder:Ae,handler:async e=>l({command:`o11y issues occurrences`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();s({command:`cf o11y issues occurrences`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/occurrences`,pathParams:{"issue-id":String(e[`issue-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ke,{account_id:u,issueId:e[`issue-id`],...i}));o(d,{successLabel:`Loaded`})})};var Me={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}/members/${t.issueId}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Ne(e){return e.usage(`$0 o11y issues remove <issueId>
39
37
 
40
- Remove an issue from a group, dissolving the group when fewer than two members remain.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`group-id`,{type:`string`,description:`GroupId`,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 Pe={command:`remove <issueId>`,describe:`Remove an issue group member`,builder:Ne,handler:async e=>l({command:`o11y issues remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
41
- `);return}let u=await c(`Deleting`,async()=>i.send(Me,{account_id:l,groupId:e[`group-id`],issueId:e[`issue-id`]}));o(u,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/summary`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ie(e){return e.usage(`$0 o11y issues summary
38
+ Remove an issue from a group, dissolving the group when fewer than two members remain.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`group-id`,{type:`string`,description:`GroupId`,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 Pe={command:`remove <issueId>`,describe:`Remove an issue group member`,builder:Ne,handler:async e=>l({command:`o11y issues remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Me,{account_id:l,groupId:e[`group-id`],issueId:e[`issue-id`]}));o(u,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/summary`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ie(e){return e.usage(`$0 o11y issues summary
42
39
 
43
40
  Retrieve aggregate issue counts for the account.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`summary`,describe:`Summarize detected issues`,builder:Ie,handler:async e=>l({command:`o11y issues summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service};if(e.dryRun){let e=await r();s({command:`cf o11y issues summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/summary`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Fe,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var Re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ze(e){return e.usage(`$0 o11y issues ungroup <groupId>
44
41
 
45
- Dissolve an issue group and restore its members as standalone issues.`).positional(`group-id`,{type:`string`,description:`GroupId`,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 Be={command:`ungroup <groupId>`,describe:`Dissolve an issue group`,builder:ze,handler:async e=>l({command:`o11y issues ungroup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues ungroup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
46
- `);return}let u=await c(`Deleting`,async()=>i.send(Re,{account_id:l,groupId:e[`group-id`]}));o(u,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ve(e){return e.usage(`$0 o11y issues update <issueId>
42
+ Dissolve an issue group and restore its members as standalone issues.`).positional(`group-id`,{type:`string`,description:`GroupId`,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 Be={command:`ungroup <groupId>`,describe:`Dissolve an issue group`,builder:ze,handler:async e=>l({command:`o11y issues ungroup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues ungroup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Re,{account_id:l,groupId:e[`group-id`]}));o(u,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ve(e){return e.usage(`$0 o11y issues update <issueId>
47
43
 
48
44
  Modify an issue status or group title.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`active`,`resolved`,`ignored`]}).coerce(`status`,e=>m(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Modify an issue status or group title.`})}const He={command:`update <issueId>`,describe:`Modify an issue`,builder:Ve,handler:async e=>l({command:`o11y issues update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y issues update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({status:e.status,title:m(e.title,`title`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(V,{body:t,account_id:l,issueId:e[`issue-id`]}));o(n,{successLabel:`Updated`});return}let u=p({status:e.status,title:m(e.title,`title`,`text`)}),f=await c(`Updating`,async()=>i.send(V,{body:u,account_id:l,issueId:e[`issue-id`]}));o(f,{successLabel:`Updated`})})},Ue={command:`issues`,describe:`Operations for issues`,builder:e=>e.command(T).command(xe).command(Ce).command(Ee).command(Oe).command(je).command(Pe).command(Le).command(Be).command(He).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var We={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/metricsexport`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function Ge(e){return e.usage(`$0 o11y metrics-export list
49
45
 
@@ -53,8 +49,7 @@ Create or replace resources configured for Workers Observability metrics export.
53
49
 
54
50
  Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const Ze={command:`create`,describe:`Save query`,builder:Xe,handler:async e=>l({command:`o11y queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(U,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let f=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),g=await c(`Creating`,async()=>i.send(U,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var Qe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function $e(e){return e.usage(`$0 o11y queries delete <queryId>
55
51
 
56
- Delete a saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,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 et={command:`delete <queryId>`,describe:`Delete query`,builder:$e,handler:async e=>l({command:`o11y queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
57
- `);return}let u=await c(`Deleting`,async()=>i.send(Qe,{account_id:l,queryId:e[`query-id`]}));o(u,{successLabel:`Deleted`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function tt(e){return e.usage(`$0 o11y queries edit <queryId>
52
+ Delete a saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,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 et={command:`delete <queryId>`,describe:`Delete query`,builder:$e,handler:async e=>l({command:`o11y queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Qe,{account_id:l,queryId:e[`query-id`]}));o(u,{successLabel:`Deleted`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function tt(e){return e.usage(`$0 o11y queries edit <queryId>
58
53
 
59
54
  Update saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const nt={command:`edit <queryId>`,describe:`Update query`,builder:tt,handler:async e=>l({command:`o11y queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(W,{body:t,account_id:l,queryId:e[`query-id`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let f=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),g=await c(`Updating`,async()=>i.send(W,{body:f,account_id:l,queryId:e[`query-id`]}));o(g,{successLabel:`Updated`})})};var rt={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function it(e){return e.usage(`$0 o11y queries get <queryId>
60
55
 
@@ -76,15 +71,13 @@ Run a temporary or saved query.`).option(`chart`,{type:`boolean`,description:`Wh
76
71
 
77
72
  List unique values found in your events.`).option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters before listing values. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`key`,{type:`string`,description:`The key field`}).option(`limit`,{type:`number`,description:`The limit field`,default:50}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`timeframe-from`,{type:`number`,description:`The timeframe.from field`}).option(`timeframe-to`,{type:`number`,description:`The timeframe.to field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`string`,`boolean`,`number`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Retrieve values from your telemetry events.`})}const Tt={command:`values`,describe:`List values`,builder:wt,handler:async e=>l({command:`o11y telemetry values`,classification:{safeFlags:[`needle-is-regex`,`needle-match-case`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry values`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/values`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({datasets:e.datasets,filters:u(e.filters,`filters`),key:m(e.key,`key`,`text`),limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},type:e.type}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(X,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.datasets===void 0)throw Error(`--datasets is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`The key field`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await g(`type`,`The type field`,[`string`,`boolean`,`number`]));let f=p({datasets:e.datasets,filters:u(e.filters,`filters`),key:m(e.key,`key`,`text`),limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},type:e.type}),_=await c(`Creating`,async()=>i.send(X,{body:f,account_id:l}));o(_,{successLabel:`Created`})})},Et={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(_t).command(yt).command(xt).command(Ct).command(Tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dt={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Ot(e){return e.usage(`$0 o11y tracing rules delete
78
73
 
79
- Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`).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 kt={command:`delete`,describe:`Delete zone trace rules`,builder:Ot,handler:async e=>l({command:`o11y tracing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
80
- `);return}let a=await c(`Deleting`,async()=>t.send(Dt,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var At={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function jt(e){return e.usage(`$0 o11y tracing rules get
74
+ Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`).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 kt={command:`delete`,describe:`Delete zone trace rules`,builder:Ot,handler:async e=>l({command:`o11y tracing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force}))return;let a=await c(`Deleting`,async()=>t.send(Dt,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var At={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function jt(e){return e.usage(`$0 o11y tracing rules get
81
75
 
82
76
  Retrieve the ordered sampling overrides for a zone's managed Cloudflare Traces ruleset.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`get`,describe:`View zone trace rules`,builder:jt,handler:async e=>l({command:`o11y tracing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(At,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Nt(e){return e.usage(`$0 o11y tracing rules update
83
77
 
84
78
  Replace all sampling overrides in a zone's managed Cloudflare Traces ruleset. Rules are evaluated in the supplied order.`).option(`rules`,{type:`string`,description:`Trace rules in evaluation order. 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:`Replace the ordered trace rules`})}const Pt={command:`update`,describe:`Replace zone trace rules`,builder:Nt,handler:async e=>l({command:`o11y tracing rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:u(e.rules,`rules`)}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send(Z,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let a=p({rules:u(e.rules,`rules`)}),l=await c(`Updating`,async()=>t.send(Z,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},Q={command:`rules`,describe:`Operations for tracing.rules`,builder:e=>e.command(kt).command(Mt).command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ft={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function It(e){return e.usage(`$0 o11y tracing settings delete
85
79
 
86
- Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`).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 Lt={command:`delete`,describe:`Reset zone tracing settings`,builder:It,handler:async e=>l({command:`o11y tracing settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
87
- `);return}let a=await c(`Deleting`,async()=>t.send(Ft,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var Rt={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function zt(e){return e.usage(`$0 o11y tracing settings get
80
+ Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`).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 Lt={command:`delete`,describe:`Reset zone tracing settings`,builder:It,handler:async e=>l({command:`o11y tracing settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force}))return;let a=await c(`Deleting`,async()=>t.send(Ft,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var Rt={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function zt(e){return e.usage(`$0 o11y tracing settings get
88
81
 
89
82
  Retrieve the zone-level Cloudflare Traces settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`get`,describe:`View zone tracing settings`,builder:zt,handler:async e=>l({command:`o11y tracing settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y tracing settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(Rt,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Vt(e){return e.usage(`$0 o11y tracing settings update
90
83
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-Cf3-g-kk.mjs";
2
+ export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-D_A8AcIS.mjs";
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{t as n}from"./cli-exit-CstFZ1eJ.mjs";import{n as r,t as i}from"./version-DmTuWNZ5.mjs";import{n as a}from"./blocks-BOQH-Won.mjs";import{t as o}from"./session-6xqrJWXy.mjs";import{t as s}from"./errors-ol9sMqSe.mjs";import{n as c,t as l}from"./project-settings-nBMEx1f-.mjs";import{a as u,n as d,o as f,t as p}from"./cf-fIBhEAxU.mjs";import{c as m,i as h,l as g,o as _}from"./log-BWdaOGOW.mjs";import{n as v}from"./context-DVh8Wyfs.mjs";import{n as y}from"./interactive-wQM7Blhm.mjs";import{i as b}from"./dialog-D5lus4M4.mjs";import{relative as x}from"node:path";function S(t,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,o=n.columns??(i.columns||80),s=c(r),u=s?x(r,s):l,d=s?`To make this the project's default account, add accountId to ${u}:`:`To make this the project's default account, create ${u}:`,f=/* @__PURE__ */ new Set([`accountId`,u]),p=a(d,Math.max(20,o-3)).map(t=>t.split(` `).map(t=>{let n=t.replace(/:$/,``);return f.has(n)?`${e.code(n)}${t.slice(n.length)}`:t}).join(` `));h.info(p.join(`
3
+ `),{output:i});let m=`accountId: ${e.jsonString(JSON.stringify(t))},`,g=s?[m]:[`import { defineConfig } from "cf/config";`,``,`export default defineConfig({`,` ${m}`,`});`],_=` `.repeat(3);i.write(`\n${g.map(e=>e&&_+e).join(`
4
+ `)}\n\n`)}const C={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var w=class extends Error{};async function T(e){if(y())throw new w;o(r);let t=await m({message:b(e),output:process.stderr});if(g(t)||typeof t!=`string`)throw new n(130,{cancelled:!0});return t}async function E(e,i){if(y())throw new w;o(r);let a=await _({message:e,output:process.stderr,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(g(a)||typeof a!=`string`)throw new n(130,{cancelled:!0});return t()||S(a),a}const D=p({logger:C,userAgent:i,prompt:T,select:E,isNoDefaultValueProvidedError:e=>e instanceof w});let O=!1;function k(e,t){O=e,D.setTemporaryAllowed(e,t)}function A(){return O}async function j(e){if(!A())throw Error(`Temporary accounts require --temporary-account.`);try{let t=await D.requireAuth({compliance_region:e?.complianceRegion??await v(e)}),{apiToken:n}=D.requireApiToken();return{accountId:t,apiToken:n}}catch(e){throw e instanceof Error&&(e.message=e.message.replaceAll(/--temporary(?!-account)/g,`--temporary-account`)),e}}async function M(e,t){try{return await D.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await v(t)})}catch(e){throw e instanceof Error&&!(`reason`in e)&&`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&y()&&D.getAPIToken()===void 0?new s(e.message,{cause:e}):e}}function N(){return D.getActiveAccountId({})}async function P(){return D.fetchAllAccounts({compliance_region:await v()},{throwOnEmpty:!1})}async function F(e){if(e?.scopes&&!f(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return D.login({compliance_region:await v()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function I(e){return D.logout(e)}function L(e){D.setProfile(e)}function R(e){u(e,{logger:C,getCredentialStore:()=>D.getCredentialStore()})}function z(){return D.getActiveProfile()}function B(){return d({logger:C})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return L(n),n}function H(){return D.getOAuthTokenFromLocalState()}function U(){return D.readAuthCredentials()?.oauth_token!==void 0}function W(){return D.readAuthCredentials()}function G(){return D.getCredentialStore().path()}export{k as _,M as a,U as c,I as d,W as f,L as g,R as h,G as i,A as l,V as m,N as n,B as o,j as p,z as r,H as s,P as t,F as u};
@@ -1,13 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B7ZJ78al.mjs";import{n}from"./auth-BUQscD5b.mjs";import{a as r,t as i}from"./context-Sgba0fZP.mjs";import{t as a}from"./output-CpiIVa7Q.mjs";import{t as o}from"./dry-run-BBjUQUhR.mjs";import{t as s}from"./progress-B1dpmxCT.mjs";import{t as c}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-Y5OBwDVE.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function g(e){return e.usage(`$0 oauth-clients create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-YrI7ltMa.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function g(e){return e.usage(`$0 oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>d(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create OAuth Client`,builder:g,handler:async e=>c({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await f(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await p(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let g=u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function y(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
5
5
 
6
- Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The \`has_rotated_secret\` field on the client indicates whether there is an old secret to delete.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 b={command:`delete-rotated-secret <oauth-client-id>`,describe:`Delete Rotated OAuth Client Secret`,builder:y,handler:async e=>c({command:`oauth-clients delete-rotated-secret`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients delete-rotated-secret`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
7
- `);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function S(e){return e.usage(`$0 oauth-clients delete <oauth-client-id>
6
+ Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The \`has_rotated_secret\` field on the client indicates whether there is an old secret to delete.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 b={command:`delete-rotated-secret <oauth-client-id>`,describe:`Delete Rotated OAuth Client Secret`,builder:y,handler:async e=>c({command:`oauth-clients delete-rotated-secret`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients delete-rotated-secret`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function S(e){return e.usage(`$0 oauth-clients delete <oauth-client-id>
8
7
 
9
- Delete an OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 C={command:`delete <oauth-client-id>`,describe:`Delete OAuth Client`,builder:S,handler:async e=>c({command:`oauth-clients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
10
- `);return}let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function T(e){return e.usage(`$0 oauth-clients get <oauth-client-id>
8
+ Delete an OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 C={command:`delete <oauth-client-id>`,describe:`Delete OAuth Client`,builder:S,handler:async e=>c({command:`oauth-clients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function T(e){return e.usage(`$0 oauth-clients get <oauth-client-id>
11
9
 
12
10
  Get details of a specific OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <oauth-client-id>`,describe:`OAuth Client Details`,builder:T,handler:async e=>c({command:`oauth-clients get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(w,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients`};function O(e){return e.usage(`$0 oauth-clients list
13
11
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-BUQscD5b.mjs";import{t}from"./output-CpiIVa7Q.mjs";import{t as n}from"./dry-run-BBjUQUhR.mjs";import{t as r}from"./progress-B1dpmxCT.mjs";import{t as i}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";var a={method:`GET`,path:()=>`/oauth/scopes`};function o(e){return e.usage(`$0 oauth-scopes list
2
+ import{n as e}from"./auth-BcNLQji1.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-CtGsPOpV.mjs";import{t as i}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var a={method:`GET`,path:()=>`/oauth/scopes`};function o(e){return e.usage(`$0 oauth-scopes list
3
3
 
4
4
  List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`List OAuth Scopes`,builder:o,handler:async o=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{t as n}from"./output-CpiIVa7Q.mjs";import{t as r}from"./dry-run-BBjUQUhR.mjs";import{t as i}from"./progress-B1dpmxCT.mjs";import{t as a}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as o,n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-Y5OBwDVE.mjs";var p={method:`GET`,path:t=>e`/organizations/${t.organization_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`]};function m(e){return e.usage(`$0 organization account list
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-CtGsPOpV.mjs";import{t as a}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as o,n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-YrI7ltMa.mjs";var p={method:`GET`,path:t=>e`/organizations/${t.organization_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`]};function m(e){return e.usage(`$0 organization account list
3
3
 
4
4
  Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included.`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
5
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
@@ -21,8 +21,7 @@ requests with a page token.`}).option(`page-size`,{type:`number`,description:`Th
21
21
 
22
22
  Create a new organization for a user. Sub-organization creation availability depends on the organization's capabilities.`).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`References an Organization in the Cloudflare data model.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --profile-* flag is set`)}return!0})}const te={command:`create`,describe:`Create organization`,builder:ee,handler:async e=>a({command:`organization create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body),r=await i(`Creating`,async()=>a.send(_,{body:t}));n(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`The name field`));let o=c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await i(`Creating`,async()=>a.send(_,{body:o}));n(d,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}`};function y(e){return e.usage(`$0 organization delete <organization-id>
23
23
 
24
- Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. Sub-organization deletion availability depends on the organization's capabilities. **Access Control:** Restricted to enterprise organizations.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,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 b={command:`delete <organization-id>`,describe:`Delete organization`,builder:y,handler:async e=>a({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this empty organization? This action cannot be undone.`})){process.stderr.write(`Aborted.
25
- `);return}let o=await i(`Deleting`,async()=>a.send(v,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/organizations/${t.organization_id}`};function S(e){return e.usage(`$0 organization get <organization-id>
24
+ Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. Sub-organization deletion availability depends on the organization's capabilities. **Access Control:** Restricted to enterprise organizations.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,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 b={command:`delete <organization-id>`,describe:`Delete organization`,builder:y,handler:async e=>a({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this empty organization? This action cannot be undone.`}))return;let o=await i(`Deleting`,async()=>a.send(v,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/organizations/${t.organization_id}`};function S(e){return e.usage(`$0 organization get <organization-id>
26
25
 
27
26
  Retrieve the details of a certain organization.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <organization-id>`,describe:`Get organization`,builder:S,handler:async e=>a({command:`organization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(x,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Loaded`})})};var w={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/invites/${t.member_code}`,body:`json`};function T(e){return e.usage(`$0 organization invite update <member-code>
28
27
 
@@ -55,8 +54,7 @@ Batch create multiple memberships that grant access to a specific Organization.`
55
54
 
56
55
  Create a membership that grants access to a specific Organization.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`member-status`,{type:`string`,description:`The member.status field`,choices:[`active`,`canceled`]}).coerce(`member-status`,e=>l(e,`member-status`,`text`)).option(`member-user-email`,{type:`string`,description:`The member.user.email 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 L={command:`create <organization-id>`,describe:`Create organization member`,builder:I,handler:async e=>a({command:`organization member create`,classification:{safeFlags:[`member-status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({member:{status:e[`member-status`],user:{email:l(e[`member-user-email`],`member-user-email`,`text`)}}}):s(e.body)});return}let a=await t(e);if(e.body){let t=s(e.body),r=await i(`Creating`,async()=>a.send(F,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Created`});return}e[`member-user-email`]===void 0&&(e[`member-user-email`]=await u(`member-user-email`,`The member.user.email field`));let o=c({member:{status:e[`member-status`],user:{email:l(e[`member-user-email`],`member-user-email`,`text`)}}}),d=await i(`Creating`,async()=>a.send(F,{body:o,organization_id:e[`organization-id`]}));n(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`,response:!1};function R(e){return e.usage(`$0 organization member delete <member-id>
57
56
 
58
- Delete a membership to a particular Organization.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,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 z={command:`delete <member-id>`,describe:`Delete organization member`,builder:R,handler:async e=>a({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this organization membership? The member will lose access to this organization and its sub-organizations.`})){process.stderr.write(`Aborted.
59
- `);return}let o=await i(`Deleting`,async()=>a.send(ne,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`};function V(e){return e.usage(`$0 organization member get <member-id>
57
+ Delete a membership to a particular Organization.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,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 z={command:`delete <member-id>`,describe:`Delete organization member`,builder:R,handler:async e=>a({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this organization membership? The member will lose access to this organization and its sub-organizations.`}))return;let o=await i(`Deleting`,async()=>a.send(ne,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`};function V(e){return e.usage(`$0 organization member get <member-id>
60
58
 
61
59
  Retrieve a single membership from an Organization.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <member-id>`,describe:`Get organization member`,builder:V,handler:async e=>a({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(B,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members`,query:[`status`,`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`],joined:[`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`]};function W(e){return e.usage(`$0 organization member list
62
60
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{t as n}from"./output-CpiIVa7Q.mjs";import{t as r}from"./dry-run-BBjUQUhR.mjs";import{t as i}from"./progress-B1dpmxCT.mjs";import{t as a}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";var o={method:`GET`,path:t=>e`/organizations/${t.organization_id}/billable/usage`,query:[`from`,`to`]};function s(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. Rated costs are available per account via `POST /accounts/{account_id}/billable/usage` with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:s,handler:async e=>a({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={from:e.from,to:e.to};if(e.dryRun){r({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(e),c=await i(`Loading`,async()=>s.send(o,{organization_id:e[`organization-id`],...a}));n(c,{successLabel:`Loaded`})})},l={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var d={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit`,query:/* @__PURE__ */ `action_result,action_type,actor_context,actor_email,actor_id,actor_ip_address,actor_token_id,actor_token_name,actor_type,id,raw_cf_ray_id,raw_method,raw_status_code,raw_uri,resource_id,resource_product,resource_type,resource_scope,action_result.not,action_type.not,actor_context.not,actor_email.not,actor_id.not,actor_ip_address.not,actor_token_id.not,actor_token_name.not,actor_type.not,id.not,raw_cf_ray_id.not,raw_method.not,raw_status_code.not,raw_uri.not,resource_id.not,resource_product.not,resource_type.not,resource_scope.not,since,before,direction,limit,cursor`.split(`,`)};function f(e){return e.usage(`$0 organizations logs audit get <organization-id>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-CtGsPOpV.mjs";import{t as a}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var o={method:`GET`,path:t=>e`/organizations/${t.organization_id}/billable/usage`,query:[`from`,`to`]};function s(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. Rated costs are available per account via `POST /accounts/{account_id}/billable/usage` with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:s,handler:async e=>a({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={from:e.from,to:e.to};if(e.dryRun){r({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(e),c=await i(`Loading`,async()=>s.send(o,{organization_id:e[`organization-id`],...a}));n(c,{successLabel:`Loaded`})})},l={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var d={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit`,query:/* @__PURE__ */ `action_result,action_type,actor_context,actor_email,actor_id,actor_ip_address,actor_token_id,actor_token_name,actor_type,id,raw_cf_ray_id,raw_method,raw_status_code,raw_uri,resource_id,resource_product,resource_type,resource_scope,action_result.not,action_type.not,actor_context.not,actor_email.not,actor_id.not,actor_ip_address.not,actor_token_id.not,actor_token_name.not,actor_type.not,id.not,raw_cf_ray_id.not,raw_method.not,raw_status_code.not,raw_uri.not,resource_id.not,resource_product.not,resource_type.not,resource_scope.not,since,before,direction,limit,cursor`.split(`,`)};function f(e){return e.usage(`$0 organizations logs audit get <organization-id>
3
3
 
4
4
  Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:f,handler:async e=>a({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let a={action_result:e[`action-result`],action_type:e[`action-type`],actor_context:e[`actor-context`],actor_email:e[`actor-email`],actor_id:e[`actor-id`],actor_ip_address:e[`actor-ip-address`],actor_token_id:e[`actor-token-id`],actor_token_name:e[`actor-token-name`],actor_type:e[`actor-type`],id:e.id,raw_cf_ray_id:e[`raw-cf-ray-id`],raw_method:e[`raw-method`],raw_status_code:e[`raw-status-code`],raw_uri:e[`raw-uri`],resource_id:e[`resource-id`],resource_product:e[`resource-product`],resource_type:e[`resource-type`],resource_scope:e[`resource-scope`],"action_result.not":e[`action-result-not`],"action_type.not":e[`action-type-not`],"actor_context.not":e[`actor-context-not`],"actor_email.not":e[`actor-email-not`],"actor_id.not":e[`actor-id-not`],"actor_ip_address.not":e[`actor-ip-address-not`],"actor_token_id.not":e[`actor-token-id-not`],"actor_token_name.not":e[`actor-token-name-not`],"actor_type.not":e[`actor-type-not`],"id.not":e[`id-not`],"raw_cf_ray_id.not":e[`raw-cf-ray-id-not`],"raw_method.not":e[`raw-method-not`],"raw_status_code.not":e[`raw-status-code-not`],"raw_uri.not":e[`raw-uri-not`],"resource_id.not":e[`resource-id-not`],"resource_product.not":e[`resource-product-not`],"resource_type.not":e[`resource-type-not`],"resource_scope.not":e[`resource-scope-not`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){r({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})};var m={method:`GET`,path:t=>e`/organizations/${t.organization_id}/logs/audit/${t.id}/history`,query:[`action_time`,`since`,`before`,`direction`,`limit`,`cursor`],errors:{404:`NotFoundError`}};function h(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:h,handler:async e=>a({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let a={action_time:e[`action-time`],since:e.since,before:e.before,direction:e.direction,limit:e.limit,cursor:e.cursor};if(e.dryRun){r({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/logs/audit/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/history`,pathParams:{"organization-id":String(e[`organization-id`]??``),id:String(e.id??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(m,{organization_id:e[`organization-id`],id:e.id,...a}));n(s,{successLabel:`Loaded`})})},_={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(u).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{y as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{i as n}from"./context-Sgba0fZP.mjs";import{t as r}from"./output-CpiIVa7Q.mjs";import{t as i}from"./dry-run-BBjUQUhR.mjs";import{t as a}from"./progress-B1dpmxCT.mjs";import{t as o}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u}from"./prompt-Y5OBwDVE.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`};function f(e){return e.usage(`$0 origin-post-quantum-encryption get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u}from"./prompt-YrI7ltMa.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`};function f(e){return e.usage(`$0 origin-post-quantum-encryption get
3
3
 
4
4
  Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:f,handler:async e=>o({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/cache/origin_post_quantum_encryption`,body:`json`};function h(e){return e.usage(`$0 origin-post-quantum-encryption update
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e,t}from"./theme-BGHWSKCw.mjs";import{t as n}from"./args-BAOHroBC.mjs";import{n as r}from"./interactive-wQM7Blhm.mjs";function i(e){return typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function a(t){process.stderr.isTTY&&!n()&&process.stderr.write(`${e.success(`✓`)} ${t}\n`)}function o(e,t={}){t.quiet||(e=i(e),e==null?t.successLabel&&a(t.successLabel):console.log(s(e)))}function s(n){let i=JSON.stringify(n,null,2);return r(process.stdout)||!t()||i.length>5e4?i:i.replace(/"((?:[^"\\]|\\.)*)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "((?:[^"\\]|\\.)*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{a as n,o as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var e=`1.0.0-beta.21`;export{e as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BUQscD5b.mjs";import{i as n}from"./context-Sgba0fZP.mjs";import{t as r}from"./output-CpiIVa7Q.mjs";import{t as i}from"./dry-run-BBjUQUhR.mjs";import{t as a}from"./progress-B1dpmxCT.mjs";import{t as o}from"./run-0EozpORq.mjs";import"./telemetry-BczXOpQn.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-Y5OBwDVE.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/pagerules`,body:`json`};function p(e){return e.usage(`$0 page-rules create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-YrI7ltMa.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/pagerules`,body:`json`};function p(e){return e.usage(`$0 page-rules create
3
3
 
4
4
  Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
5
5
  request. Actions can redirect to another URL or override settings, but
@@ -11,8 +11,7 @@ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
11
11
  specify a higher priority for rule B so it overrides rule A.
12
12
  `,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).coerce(`status`,e=>u(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create a Page Rule`,builder:p,handler:async e=>o({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}):c(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(f,{body:t,zone_id:u}));r(n,{successLabel:`Created`});return}if(e.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}),p=await a(`Creating`,async()=>o.send(f,{body:d,zone_id:u}));r(p,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`};function g(e){return e.usage(`$0 page-rules delete <pagerule-id>
13
13
 
14
- Deletes an existing Page Rule.`).positional(`pagerule-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 _={command:`delete <pagerule-id>`,describe:`Delete a Page Rule`,builder:g,handler:async e=>o({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules/${e[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(e[`pagerule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"pagerule-id":String(e[`pagerule-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await d({force:!!e.force})){process.stderr.write(`Aborted.
15
- `);return}let c=await a(`Deleting`,async()=>o.send(h,{zone_id:s,pagerule_id:e[`pagerule-id`]}));r(c,{successLabel:`Deleted`})})};var v={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`,body:`json`};function y(e){return e.usage(`$0 page-rules edit <pagerule-id>
14
+ Deletes an existing Page Rule.`).positional(`pagerule-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 _={command:`delete <pagerule-id>`,describe:`Delete a Page Rule`,builder:g,handler:async e=>o({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules/${e[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(e[`pagerule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"pagerule-id":String(e[`pagerule-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await d({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(h,{zone_id:s,pagerule_id:e[`pagerule-id`]}));r(c,{successLabel:`Deleted`})})};var v={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`,body:`json`};function y(e){return e.usage(`$0 page-rules edit <pagerule-id>
16
15
 
17
16
  Updates one or more fields of an existing Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
18
17
  request. Actions can redirect to another URL or override settings, but