cf 0.14.0 → 1.0.0-beta.0

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 (451) hide show
  1. package/LICENSE-APACHE +176 -0
  2. package/LICENSE-MIT +25 -0
  3. package/README.md +6 -7
  4. package/dist/_meta/commands.json +4040 -1629
  5. package/dist/_meta/hand-written-commands.json +16 -43
  6. package/dist/_meta/schemas.json +445 -756
  7. package/dist/abuse-reports-BwsJLiPN.mjs +26 -0
  8. package/dist/access-BVbIajYr.mjs +27 -0
  9. package/dist/account-DBLarar2.mjs +12 -0
  10. package/dist/account-tags-BNrSShjj.mjs +15 -0
  11. package/dist/accounts-CCAnDjFk.mjs +132 -0
  12. package/dist/acm-ZPYQbZQr.mjs +15 -0
  13. package/dist/addressing-BFpzLfTn.mjs +93 -0
  14. package/dist/agent-memory-DEvy2dLU.mjs +34 -0
  15. package/dist/ai-BF0_0NtS.mjs +31 -0
  16. package/dist/ai-audit-Dn03zntn.mjs +6 -0
  17. package/dist/ai-gateway-CVABbCjv.mjs +147 -0
  18. package/dist/ai-search-g0tR8Cut.mjs +79 -0
  19. package/dist/ai-security-BXXA0Jnk.mjs +10 -0
  20. package/dist/alerting-Bst10SOG.mjs +56 -0
  21. package/dist/analytics-DgEaxta8.mjs +21 -0
  22. package/dist/analytics_engine-B4DvcYmB.mjs +4 -0
  23. package/dist/{lifecycle-CadF_i2n.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  24. package/dist/api-security-Dkx1Codr.mjs +154 -0
  25. package/dist/argo-BvswWPlP.mjs +10 -0
  26. package/dist/artifacts-D8kZKJq0.mjs +43 -0
  27. package/dist/audit-logs-Bp_yQpXJ.mjs +4 -0
  28. package/dist/auth-B9w55oRg.mjs +2 -0
  29. package/dist/auth-C80y97yu.mjs +8 -0
  30. package/dist/billing-Cqj64fqz.mjs +23 -0
  31. package/dist/bot-management-CzZx_aml.mjs +9 -0
  32. package/dist/botnet-feed-Co0c8Xdj.mjs +11 -0
  33. package/dist/brand-protection-CDsGaPIl.mjs +27 -0
  34. package/dist/browser-extension-BRHJm3Qf.mjs +15 -0
  35. package/dist/browser-run-DFrohJ1p.mjs +46 -0
  36. package/dist/build-BbjcJxKq.mjs +2 -0
  37. package/dist/build-DQh5-KK4.mjs +2 -0
  38. package/dist/builds-CamhClyb.mjs +71 -0
  39. package/dist/cache-BiTk4-Zc.mjs +45 -0
  40. package/dist/certificate-authorities-Dal9DNjW.mjs +6 -0
  41. package/dist/cf-oadujOtC.mjs +18 -0
  42. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  43. package/dist/chunk-DL5FNmn1.mjs +2 -0
  44. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  45. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  46. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  47. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  48. package/dist/client-certificates-DDisXoTE.mjs +13 -0
  49. package/dist/client-side-security-CIO_YPtN.mjs +63 -0
  50. package/dist/cloud-connector-vwdixea0.mjs +6 -0
  51. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  52. package/dist/cloudforce-one-C1cFVBGK.mjs +456 -0
  53. package/dist/command-BP7ldws1.mjs +2 -0
  54. package/dist/command-BtNRBTP6.mjs +2 -0
  55. package/dist/{command-BL6weJf3.mjs → command-CF0giIIc.mjs} +1 -1
  56. package/dist/command-Ck9rbHA4.mjs +2 -0
  57. package/dist/{completions-Dn621okY.mjs → completions-xPLd1cvL.mjs} +3 -3
  58. package/dist/{config-BY6KpMZs.mjs → config-B4vIa0zp.mjs} +1 -1
  59. package/dist/connector-interrupts-DQ5T-HMN.mjs +6 -0
  60. package/dist/connector-telemetry-events-DWam38_9.mjs +6 -0
  61. package/dist/connector-telemetry-snapshots-DX6AJf9Q.mjs +6 -0
  62. package/dist/connectors-CBhLWVd-.mjs +15 -0
  63. package/dist/{dist-CFQREIRi.mjs → containers-Bx_44bmJ.mjs} +84 -83
  64. package/dist/containers-C7blN-pe.mjs +78 -0
  65. package/dist/content-scan-CC91dAlv.mjs +14 -0
  66. package/dist/cps-D9a4N_bH.mjs +6 -0
  67. package/dist/csamScanner-T7nbCnep.mjs +10 -0
  68. package/dist/ct-alerting-CkjNJlla.mjs +5 -0
  69. package/dist/custom-certificates-DnWnt9oJ.mjs +17 -0
  70. package/dist/custom-csrs-Db2pF9Ib.mjs +11 -0
  71. package/dist/custom-hostnames-B_N-uSIa.mjs +27 -0
  72. package/dist/custom-nameservers-DPA_sFY8.mjs +9 -0
  73. package/dist/custom-pages-D6fxEBoh.mjs +21 -0
  74. package/dist/d1-DXs1xVmH.mjs +45 -0
  75. package/dist/data-security-CVZAIzhe.mjs +71 -0
  76. package/dist/dcv-delegation-as1ue_wx.mjs +4 -0
  77. package/dist/delegate-GctF_lrq.mjs +2 -0
  78. package/dist/delegate.mjs +1 -1
  79. package/dist/{deploy-BtETDvDA.mjs → deploy-D2XXCkqk.mjs} +1 -1
  80. package/dist/{deploy-input-BoLTdQzS.mjs → deploy-input-BCYyKXpp.mjs} +1 -1
  81. package/dist/{dev-B5WcIpEr.mjs → dev-nsNxyg2D.mjs} +1 -1
  82. package/dist/diagnostics-BKH1Oh-C.mjs +15 -0
  83. package/dist/{dialog-Bud0hiYv.mjs → dialog-Dx4rRcKM.mjs} +1 -1
  84. package/dist/dist-BDOzKthe.mjs +48 -0
  85. package/dist/{dist-BRg_z9Ut.mjs → dist-BpadEMNY.mjs} +1 -1
  86. package/dist/dist-dc4E1u01.mjs +272 -0
  87. package/dist/dls-C5kAQsN6.mjs +17 -0
  88. package/dist/dns-CYwXrdJO.mjs +135 -0
  89. package/dist/dns-firewall-BEw4QcXj.mjs +71 -0
  90. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  91. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  92. package/dist/durable-objects-3jvUgzKd.mjs +8 -0
  93. package/dist/email-auth-B3MD8FrJ.mjs +6 -0
  94. package/dist/email-routing-C4YhZGPw.mjs +45 -0
  95. package/dist/email-security-BcFyWNby.mjs +160 -0
  96. package/dist/email-sending-BO1GOAho.mjs +47 -0
  97. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  98. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  99. package/dist/fieldExtractors-BJDnzNCN.mjs +9 -0
  100. package/dist/firewall-BSMa9aH3.mjs +56 -0
  101. package/dist/flagship-BJYMb7hb.mjs +28 -0
  102. package/dist/fraud-C7kS7kP9.mjs +22 -0
  103. package/dist/google-tag-gateway-8VR-j0sa.mjs +6 -0
  104. package/dist/healthchecks-BJleItOD.mjs +22 -0
  105. package/dist/hostnames-CHajvoHa.mjs +11 -0
  106. package/dist/hyperdrive-DlxQrok-.mjs +37 -0
  107. package/dist/iam-B7oTr6vW.mjs +52 -0
  108. package/dist/images-xLAYe436.mjs +71 -0
  109. package/dist/index.mjs +1 -1
  110. package/dist/intel-DwZXY1YE.mjs +76 -0
  111. package/dist/{interactive-CGOh-aYq.mjs → interactive-B6woOLo-.mjs} +23 -23
  112. package/dist/interactive-DnUvQHjc.mjs +2 -0
  113. package/dist/ips-BC_9nKE7.mjs +4 -0
  114. package/dist/keyless-certificates-CtsCsbZ2.mjs +13 -0
  115. package/dist/keys-K-GFzhku.mjs +4 -0
  116. package/dist/kv-Bfwz_ULu.mjs +21 -0
  117. package/dist/leaked-credential-checks-D8UuxztO.mjs +18 -0
  118. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  119. package/dist/load-balancers-B0XeGLhT.mjs +76 -0
  120. package/dist/local-B6b2OIBW.mjs +2 -0
  121. package/dist/local-BrfySqnx.mjs +2 -0
  122. package/dist/{local-runtime-Dj8k-p62.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  123. package/dist/login-CAsRUF4c.mjs +2 -0
  124. package/dist/login-DaglE6WA.mjs +5 -0
  125. package/dist/logo-matches-DWg5ezsM.mjs +6 -0
  126. package/dist/logos-6A6gJC5C.mjs +7 -0
  127. package/dist/logpush-DwehajAw.mjs +46 -0
  128. package/dist/logs-BWg7YymF.mjs +48 -0
  129. package/dist/magic-cloud-networking--14hNj2F.mjs +71 -0
  130. package/dist/magic-network-monitoring-Dzo4L6kd.mjs +36 -0
  131. package/dist/magic-transit-DDO0A5v4.mjs +387 -0
  132. package/dist/managed-defense-DQ0iwWdG.mjs +18 -0
  133. package/dist/managed-transforms-DDIdcPG0.mjs +9 -0
  134. package/dist/matches-D6ahHNaP.mjs +6 -0
  135. package/dist/mcp-BcIrLbRv.mjs +32 -0
  136. package/dist/mesh-wLiPcWyN.mjs +26 -0
  137. package/dist/mtls-certificates-AEuNOERQ.mjs +13 -0
  138. package/dist/network-DZsrs_sw.mjs +50 -0
  139. package/dist/network-interconnects-Cjbu4EMv.mjs +73 -0
  140. package/dist/oauth-C-QCVfWz.mjs +14 -0
  141. package/dist/oauth-Cu1twz9z.mjs +2 -0
  142. package/dist/oauth-clients-DR0hzakz.mjs +16 -0
  143. package/dist/oauth-scopes-BDNpJJ32.mjs +4 -0
  144. package/dist/observability-BnHy2M6p.mjs +80 -0
  145. package/dist/{open-PBXRGS4R-ClEt4E8F.mjs → open-PBXRGS4R-C4CKEADM.mjs} +1 -1
  146. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  147. package/dist/organization-iasRm69J.mjs +75 -0
  148. package/dist/organizations-CUzCIKXV.mjs +4 -0
  149. package/dist/origin-ca-certificates-iQXSqBI0.mjs +11 -0
  150. package/dist/origin-post-quantum-encryption-DcMDK6Tz.mjs +6 -0
  151. package/dist/origin-tls-client-auth-D1X26X7y.mjs +30 -0
  152. package/dist/{output-Z2lQmPUW.mjs → output-Bia1u2k5.mjs} +1 -1
  153. package/dist/page-rules-CXa8EYcP.mjs +39 -0
  154. package/dist/pages-Cu0m9GSH.mjs +60 -0
  155. package/dist/pay-per-crawl-DmF8xlm_.mjs +65 -0
  156. package/dist/pay-per-use-DIp2fwJU.mjs +6 -0
  157. package/dist/pipelines-MmXlsxYO.mjs +44 -0
  158. package/dist/precursor-jqeEG_mJ.mjs +4 -0
  159. package/dist/previews-Cg6lc24N.mjs +4 -0
  160. package/dist/progress-Bpp73hIu.mjs +2 -0
  161. package/dist/{prompt-BP8XrQSj.mjs → prompt-CpZztV8c.mjs} +1 -1
  162. package/dist/queries-VzdcSR5H.mjs +9 -0
  163. package/dist/queues-BZYl2emH.mjs +63 -0
  164. package/dist/r2-data-catalog-DISnPFPY.mjs +44 -0
  165. package/dist/r2-omcKF8_A.mjs +127 -0
  166. package/dist/radar-JzBTD249.mjs +300 -0
  167. package/dist/{raw-fetch-DNH2V8qH.mjs → raw-fetch-DxGs_eRm.mjs} +1 -1
  168. package/dist/realtime-yIdAJ0Yf.mjs +172 -0
  169. package/dist/registrar-D-Li9gNk.mjs +43 -0
  170. package/dist/registrar-sandbox-CKSSHAyv.mjs +56 -0
  171. package/dist/{registry-BrtVdMrC.mjs → registry-vreNkX6u.mjs} +1 -1
  172. package/dist/reporting-Cf-pnw6h.mjs +14 -0
  173. package/dist/request-headers-DaXBfmVn.mjs +2 -0
  174. package/dist/request-tracers-BegIQTzt.mjs +4 -0
  175. package/dist/resolve-BXemCSyA.mjs +2 -0
  176. package/dist/resolve-CUDKxUrW.mjs +2 -0
  177. package/dist/resource-sharing-DEVgiYzM.mjs +40 -0
  178. package/dist/resource-tagging-Cm2yJkU9.mjs +4 -0
  179. package/dist/rules-DDCa7cYF.mjs +18 -0
  180. package/dist/rulesets-BhS7Hvtu.mjs +37 -0
  181. package/dist/rum-EIj9ViSn.mjs +30 -0
  182. package/dist/run-CSFE1qVX.mjs +2 -0
  183. package/dist/run-ChM_YpZ0.mjs +2 -0
  184. package/dist/{schema-DmuJtMN5.mjs → schema-DCBb3Fcs.mjs} +1 -1
  185. package/dist/{schema-flags-CUGxFeZe.mjs → schema-flags--GosoCMU.mjs} +1 -1
  186. package/dist/scim-DA83eNe-.mjs +18 -0
  187. package/dist/{sdk-Bvqx-_3z.mjs → sdk-CvIO3tWS.mjs} +1 -1
  188. package/dist/secrets-store-BTd3eGIB.mjs +24 -0
  189. package/dist/security-center-DbH_7h-T.mjs +30 -0
  190. package/dist/security-txt-DSrHhVEN.mjs +9 -0
  191. package/dist/shared-CtBkOWGN.mjs +2 -0
  192. package/dist/smart-shield-DnSTo-OI.mjs +24 -0
  193. package/dist/snippets-An5kQs33.mjs +20 -0
  194. package/dist/source-BR4_k2ad.mjs +6 -0
  195. package/dist/spawn-7IW1UyoH.mjs +523 -0
  196. package/dist/spectrum-Ci79n7fd.mjs +83 -0
  197. package/dist/speed-BBL7LrLn.mjs +24 -0
  198. package/dist/src-CNHNCZpy.mjs +108 -0
  199. package/dist/ssl-B2psFIRm.mjs +45 -0
  200. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  201. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  202. package/dist/state-BxCejn42.mjs +2 -0
  203. package/dist/state-DSzkxXML.mjs +2 -0
  204. package/dist/stream-Du0Q7UOh.mjs +102 -0
  205. package/dist/submit-CU8S2jBT.mjs +4 -0
  206. package/dist/tags-C3l5aZSi.mjs +4 -0
  207. package/dist/telemetry-CNt8H3aA.mjs +2 -0
  208. package/dist/{telemetry-2s9Y3FaN.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  209. package/dist/telemetry-PHe8XxA2.mjs +2 -0
  210. package/dist/tenant-BZ0ysR9L.mjs +12 -0
  211. package/dist/tenant-custom-nameservers-DtKeyM5J.mjs +9 -0
  212. package/dist/{tools-Dz1JCrHd.mjs → tools-BMKpYraQ.mjs} +1 -1
  213. package/dist/tunnels-D1tRWQQi.mjs +29 -0
  214. package/dist/turnstile-DBa4_Vyz.mjs +33 -0
  215. package/dist/ui-DH95w1Qk.mjs +5 -0
  216. package/dist/undici-DTSBJHNS.mjs +96 -0
  217. package/dist/update-check-AAn7EXw8.mjs +2 -0
  218. package/dist/update-check-BbIXBq1o.mjs +2 -0
  219. package/dist/update-check-worker.mjs +2 -0
  220. package/dist/url-info-BRA0XGT2.mjs +4 -0
  221. package/dist/url-normalization-B6N2m5s6.mjs +9 -0
  222. package/dist/url-scanner-CeKkzkhe.mjs +16 -0
  223. package/dist/user-CftksgmF.mjs +112 -0
  224. package/dist/values-m7w9PX3o.mjs +4 -0
  225. package/dist/vectorize-BWBEtsgZ.mjs +32 -0
  226. package/dist/version-cPq-WKL8.mjs +2 -0
  227. package/dist/waiting-rooms-BVZSYTNJ.mjs +53 -0
  228. package/dist/web-assets-CLU5vAgP.mjs +64 -0
  229. package/dist/web3-Dkd4XRNH.mjs +28 -0
  230. package/dist/workers-BQi4_SBS.mjs +36 -0
  231. package/dist/workers-builds-BgtPSDYJ.mjs +14 -0
  232. package/dist/workers-for-platforms-actLCM6Q.mjs +25 -0
  233. package/dist/workers-vpc-DjGfJgQn.mjs +13 -0
  234. package/dist/workflows-Cm7WsAgB.mjs +43 -0
  235. package/dist/zaraz-DurWe32F.mjs +22 -0
  236. package/dist/zero-trust-D8SVU8YZ.mjs +795 -0
  237. package/dist/zone-B3AEAfcd.mjs +4 -0
  238. package/dist/zones-DiX5LoSU.mjs +124 -0
  239. package/package.json +26 -11
  240. package/dist/_meta/agent-context.json +0 -195
  241. package/dist/abuse-reports-CDFjJ2e8.mjs +0 -8
  242. package/dist/access-BoT1waG4.mjs +0 -11
  243. package/dist/account-agnMUKWj.mjs +0 -2
  244. package/dist/account-tags-BRMMHCee.mjs +0 -9
  245. package/dist/accounts-Cut77dAt.mjs +0 -30
  246. package/dist/acm-C8WgXNCl.mjs +0 -3
  247. package/dist/addressing-CR8EV42x.mjs +0 -13
  248. package/dist/agent-context-Wj5TRRbW.mjs +0 -8
  249. package/dist/agent-memory-CVJpKKZy.mjs +0 -6
  250. package/dist/ai-BbNYt-yI.mjs +0 -5
  251. package/dist/ai-audit-mVajM-2i.mjs +0 -2
  252. package/dist/ai-gateway-BsepSA_v.mjs +0 -13
  253. package/dist/ai-search-DbEJqm5-.mjs +0 -7
  254. package/dist/ai-security-DmyB5EYk.mjs +0 -4
  255. package/dist/alerting-dmy3hd8O.mjs +0 -6
  256. package/dist/analytics-B1xBMla0.mjs +0 -5
  257. package/dist/analytics_engine-DazCn3iC.mjs +0 -2
  258. package/dist/api-security-0HXCzfHk.mjs +0 -50
  259. package/dist/argo-DSHsE8zv.mjs +0 -2
  260. package/dist/artifacts-CwiU9Mxu.mjs +0 -5
  261. package/dist/audit-logs-DwFtMDwH.mjs +0 -2
  262. package/dist/auth-B0ZyXc3y.mjs +0 -5
  263. package/dist/auth-DWxtJ918.mjs +0 -8
  264. package/dist/billing-Cbpadkgu.mjs +0 -3
  265. package/dist/bot-management-B6M2Vyyn.mjs +0 -5
  266. package/dist/botnet-feed-Dn8UuE4h.mjs +0 -3
  267. package/dist/brand-protection-B5R0b3pu.mjs +0 -3
  268. package/dist/browser-extension-D55pYZf_.mjs +0 -3
  269. package/dist/browser-run-C1b2VkGB.mjs +0 -4
  270. package/dist/build-CP2JUfV1.mjs +0 -2
  271. package/dist/builds-CVEXO_4a.mjs +0 -9
  272. package/dist/cache-BU5xX82E.mjs +0 -9
  273. package/dist/certificate-authorities--tZTWJWD.mjs +0 -2
  274. package/dist/cf-BV2HLCQm.mjs +0 -18
  275. package/dist/chunk-QBZBEHZB-BcCMlc8C.mjs +0 -2
  276. package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +0 -103
  277. package/dist/chunk-vbHwaUoU.mjs +0 -2
  278. package/dist/client-certificates-DX84qeYG.mjs +0 -3
  279. package/dist/client-side-security-DsSO2rZQ.mjs +0 -37
  280. package/dist/cloud-connector-cf8qlxap.mjs +0 -2
  281. package/dist/cloudforce-one-DzVXorbu.mjs +0 -32
  282. package/dist/command-DYrspBc0.mjs +0 -2
  283. package/dist/connector-interrupts-DqpqPPkp.mjs +0 -2
  284. package/dist/connector-telemetry-events-CCD-_B-8.mjs +0 -2
  285. package/dist/connector-telemetry-snapshots-D3CeGGhk.mjs +0 -2
  286. package/dist/connectors-aPQspZdg.mjs +0 -3
  287. package/dist/containers-D0Kjl8h-.mjs +0 -58
  288. package/dist/content-scan-BVx18XmS.mjs +0 -4
  289. package/dist/cps-ByazyM0x.mjs +0 -2
  290. package/dist/csamScanner-OG5lQxBC.mjs +0 -6
  291. package/dist/ct-alerting-BJx5n8Zf.mjs +0 -3
  292. package/dist/custom-certificates-BuJ2e9TA.mjs +0 -5
  293. package/dist/custom-csrs-CR_5qbST.mjs +0 -3
  294. package/dist/custom-hostnames-BzDTsQXb.mjs +0 -5
  295. package/dist/custom-nameservers-OfMPRGkD.mjs +0 -3
  296. package/dist/custom-pages-BmGXoTIo.mjs +0 -3
  297. package/dist/d1-DedC8N0N.mjs +0 -21
  298. package/dist/data-security-B2UB26ry.mjs +0 -7
  299. package/dist/dcv-delegation-C11vmzbG.mjs +0 -2
  300. package/dist/diagnostics-Cf6BLpAo.mjs +0 -3
  301. package/dist/dist-CyisSore.mjs +0 -371
  302. package/dist/dist-Dr4Hg_Up.mjs +0 -48
  303. package/dist/dls-R6PvHbhj.mjs +0 -3
  304. package/dist/dns-Cl8se64c.mjs +0 -29
  305. package/dist/dns-firewall-WtmKilDT.mjs +0 -57
  306. package/dist/dry-run-YSQndLvt.mjs +0 -2
  307. package/dist/durable-objects-jfVU6yp_.mjs +0 -2
  308. package/dist/email-auth-DPmZ85eW.mjs +0 -2
  309. package/dist/email-routing-Bf6DbNTr.mjs +0 -6
  310. package/dist/email-security-DTifjSxM.mjs +0 -18
  311. package/dist/email-sending-Dm3WkFHV.mjs +0 -7
  312. package/dist/error-sanitization-D8zuyPj_.mjs +0 -2
  313. package/dist/fieldExtractors-CeXZL0-I.mjs +0 -3
  314. package/dist/firewall-D5N2APXO.mjs +0 -8
  315. package/dist/flagship-sUOy9jei.mjs +0 -4
  316. package/dist/fraud-WLW2Ep1Z.mjs +0 -20
  317. package/dist/google-tag-gateway-lbww1FaJ.mjs +0 -2
  318. package/dist/healthchecks-0ih8Qjiw.mjs +0 -4
  319. package/dist/hostnames-Ba6FuL8K.mjs +0 -3
  320. package/dist/hyperdrive-DMqcU639.mjs +0 -21
  321. package/dist/iam-CXlYm0uC.mjs +0 -6
  322. package/dist/images-D_g1oli6.mjs +0 -8
  323. package/dist/intel-B8bS0ARd.mjs +0 -8
  324. package/dist/ips-68fzniN4.mjs +0 -2
  325. package/dist/keyless-certificates-CeLnqBvX.mjs +0 -3
  326. package/dist/keys-DkVdS2lF.mjs +0 -2
  327. package/dist/kv-gDAN50BQ.mjs +0 -5
  328. package/dist/leaked-credential-checks-DfnvHpvg.mjs +0 -4
  329. package/dist/load-balancers-m0HqyXPZ.mjs +0 -6
  330. package/dist/local-BwL_gesw.mjs +0 -2
  331. package/dist/logo-matches-DPbHlsKQ.mjs +0 -2
  332. package/dist/logos-DFBJFAYJ.mjs +0 -3
  333. package/dist/logpush-gzmlZayc.mjs +0 -4
  334. package/dist/logs-BuzwQgt5.mjs +0 -18
  335. package/dist/magic-cloud-networking-BbHCi1Vp.mjs +0 -5
  336. package/dist/magic-network-monitoring-kWMmnPTG.mjs +0 -4
  337. package/dist/magic-transit-ClSmJDKw.mjs +0 -111
  338. package/dist/managed-defense-EOihg1UR.mjs +0 -2
  339. package/dist/managed-transforms-BZ_XdGE2.mjs +0 -3
  340. package/dist/matches-B6sG0_fr.mjs +0 -2
  341. package/dist/mcp--kK0vS5i.mjs +0 -4
  342. package/dist/mesh-DfXYUHOO.mjs +0 -4
  343. package/dist/mtls-certificates-DZd-0X7l.mjs +0 -3
  344. package/dist/network-U6f_5ihp.mjs +0 -6
  345. package/dist/network-interconnects-DKZGTiYM.mjs +0 -41
  346. package/dist/oauth-BdVr2hJp.mjs +0 -14
  347. package/dist/oauth-clients-CY3OkPhC.mjs +0 -4
  348. package/dist/oauth-scopes-BTY7_5L-.mjs +0 -2
  349. package/dist/observability-Bsp-LdmJ.mjs +0 -10
  350. package/dist/organization-BSeMdj-7.mjs +0 -45
  351. package/dist/organizations-BroR48Nv.mjs +0 -2
  352. package/dist/origin-ca-certificates-jC-EMn6W.mjs +0 -3
  353. package/dist/origin-post-quantum-encryption-DIspLvA0.mjs +0 -2
  354. package/dist/origin-tls-client-auth-CZ_nUEcM.mjs +0 -4
  355. package/dist/page-rules-ZcdjPohY.mjs +0 -27
  356. package/dist/pages-W4tKa7xk.mjs +0 -14
  357. package/dist/pay-per-crawl-BNM1mJmP.mjs +0 -5
  358. package/dist/pay-per-use-DKxlnkH3.mjs +0 -2
  359. package/dist/pipelines-Dug0BR-c.mjs +0 -6
  360. package/dist/precursor-D-11DkRU.mjs +0 -4
  361. package/dist/previews-D_Nv4dR6.mjs +0 -4
  362. package/dist/progress-a5IKeKni.mjs +0 -2
  363. package/dist/queries-BdA2vJoe.mjs +0 -3
  364. package/dist/queues-Bu06ZqUE.mjs +0 -7
  365. package/dist/r2-COC9wMKb.mjs +0 -25
  366. package/dist/r2-data-catalog-CX5Rl5Qx.mjs +0 -16
  367. package/dist/radar-L-yoLIHF.mjs +0 -2
  368. package/dist/realtime-JKIiXfzi.mjs +0 -20
  369. package/dist/registrar-_dYUZrK0.mjs +0 -43
  370. package/dist/registrar-sandbox-D1yfW_Q_.mjs +0 -56
  371. package/dist/reporting-3fyoMcmb.mjs +0 -2
  372. package/dist/request-headers-BhQQAfJt.mjs +0 -2
  373. package/dist/request-tracers-TisEth2p.mjs +0 -2
  374. package/dist/resolve-CYUp6YgC.mjs +0 -2
  375. package/dist/resource-sharing-C4-dnohU.mjs +0 -6
  376. package/dist/resource-tagging-BRDifKqM.mjs +0 -2
  377. package/dist/rules-BCF3gIkw.mjs +0 -4
  378. package/dist/rulesets-wp6rllt3.mjs +0 -5
  379. package/dist/rum-B77awgoB.mjs +0 -4
  380. package/dist/run-BS8otL3u.mjs +0 -2
  381. package/dist/scim-C9BmUYil.mjs +0 -4
  382. package/dist/secrets-store-ckkZR2dM.mjs +0 -7
  383. package/dist/security-center-BCahKT57.mjs +0 -2
  384. package/dist/security-txt-0SI5du7I.mjs +0 -3
  385. package/dist/shared-D0B-7q-D.mjs +0 -2
  386. package/dist/smart-shield-BDPbrZa4.mjs +0 -4
  387. package/dist/snippets-CVRR_h0i.mjs +0 -4
  388. package/dist/spawn-DP4T92ss.mjs +0 -519
  389. package/dist/spectrum-CjNXQIQE.mjs +0 -63
  390. package/dist/speed-CrXCHk3h.mjs +0 -4
  391. package/dist/src-BbnV77C4.mjs +0 -108
  392. package/dist/ssl-DKORhHkh.mjs +0 -15
  393. package/dist/startup-profile-CBIH6yZy.mjs +0 -17
  394. package/dist/state-QUu6HfxC.mjs +0 -2
  395. package/dist/stream-wY3zi3FK.mjs +0 -16
  396. package/dist/submit-B-4oCBSk.mjs +0 -2
  397. package/dist/tags-5uJEkYJZ.mjs +0 -2
  398. package/dist/telemetry-n3NJourL.mjs +0 -2
  399. package/dist/tenant-BkFvv2o3.mjs +0 -2
  400. package/dist/tenant-custom-nameservers-DcjC1q0r.mjs +0 -3
  401. package/dist/tunnel-Cd4ipbvJ.mjs +0 -2
  402. package/dist/tunnels-9Zg3ePwD.mjs +0 -5
  403. package/dist/turnstile-BTwKYpzD.mjs +0 -23
  404. package/dist/ui-DQSZeaG5.mjs +0 -5
  405. package/dist/url-info-D7Y61BFd.mjs +0 -2
  406. package/dist/url-normalization-B4n8HiNQ.mjs +0 -3
  407. package/dist/url-scanner-CiCIltSQ.mjs +0 -2
  408. package/dist/user-DDFDGJ0Y.mjs +0 -12
  409. package/dist/values-DRznB_Cl.mjs +0 -2
  410. package/dist/vectorize-CbznPhzq.mjs +0 -4
  411. package/dist/waiting-rooms-CKP5hYBK.mjs +0 -11
  412. package/dist/web-assets-C-ZoSkkh.mjs +0 -8
  413. package/dist/web3-DwlN4dOw.mjs +0 -4
  414. package/dist/workers-builds-ECw_x_kp.mjs +0 -2
  415. package/dist/workers-for-platforms-BYGy46R6.mjs +0 -5
  416. package/dist/workers-vpc-CCosFcxz.mjs +0 -3
  417. package/dist/workers-zFMrbUkg.mjs +0 -6
  418. package/dist/workflows-C8GXGDRW.mjs +0 -5
  419. package/dist/zaraz-B5UIREaz.mjs +0 -2
  420. package/dist/zero-trust-DUp0XoIo.mjs +0 -91
  421. package/dist/zone-BGLkk-mL.mjs +0 -2
  422. package/dist/zones-CwYjNXMH.mjs +0 -44
  423. /package/dist/{alerts-CarPLL8k.mjs → alerts-CstOk8n0.mjs} +0 -0
  424. /package/dist/{autorag-zK-3harf.mjs → autorag-PRTwXGgn.mjs} +0 -0
  425. /package/dist/{body-parser-Cmw7PZ7a.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  426. /package/dist/{brands-CpgTsX8h.mjs → brands-BHRXlWDm.mjs} +0 -0
  427. /package/dist/{clear-C5gzBA8G.mjs → clear-UvKESVx3.mjs} +0 -0
  428. /package/dist/{cli-types-abvWQN3T.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  429. /package/dist/{connector-telemetry-events-latest-BY-dbhQZ.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  430. /package/dist/{connector-telemetry-snapshots-latest-DoMvHvCO.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  431. /package/dist/{domain-info-Cw3G4nap.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  432. /package/dist/{health-DkEXPkS6.mjs → health-CwPzzrV6.mjs} +0 -0
  433. /package/dist/{input-validation-nF-0Ze2h.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  434. /package/dist/{internal-4fU2r5en.mjs → internal-WLHfxX64.mjs} +0 -0
  435. /package/dist/{live-B4iGrwY2.mjs → live-D_k7eHdv.mjs} +0 -0
  436. /package/dist/{metadata-C5fJJr-k.mjs → metadata-APBiectA.mjs} +0 -0
  437. /package/dist/{project-settings-Bc3wYHo8.mjs → project-settings-DSXevRvj.mjs} +0 -0
  438. /package/dist/{rate-limit-analytics-DNsAFIeM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  439. /package/dist/{rate-limits-CsOim7bm.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  440. /package/dist/{ready-tTe-zcIw.mjs → ready-CvwvbdTX.mjs} +0 -0
  441. /package/dist/{recent-submissions-B3eTV5yC.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  442. /package/dist/{refute-BY76YVrT.mjs → refute-CIAFMj00.mjs} +0 -0
  443. /package/dist/{scan-logo-DdoF_a5y.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  444. /package/dist/{scan-page-sSgLwwZN.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  445. /package/dist/{search-BFvQr-sl.mjs → search-12jA1b4l.mjs} +0 -0
  446. /package/dist/{signed-url-Cr8hiZPJ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  447. /package/dist/{submission-info-DT2mLnu1.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  448. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  449. /package/dist/{total-queries-6gs5iy9T.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  450. /package/dist/{tracked-domains-D6XKO2EV.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  451. /package/dist/{verify-CM1NakP0.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{i as l}from"./prompt-CpZztV8c.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
3
+
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 d={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 origin-post-quantum-encryption update
5
+
6
+ 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(`value`,{type:`string`,description:`Value of the Origin Post Quantum Encryption Setting.`,choices:[`preferred`,`supported`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Change Origin Post-Quantum Encryption setting`,builder:f,handler:async u=>a({command:`origin-post-quantum-encryption update`,classification:{safeFlags:[`value`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf origin-post-quantum-encryption update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({value:c(u.value,`value`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...e,zone_id:d})),{successLabel:`Updated`});return}u.value===void 0&&(u.value=await l(`value`,`Value of the Origin Post Quantum Encryption Setting.`,[`preferred`,`supported`,`off`]));let f=s({value:c(u.value,`value`,`text`)});n(await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...f,zone_id:d})),{successLabel:`Updated`})})},m={command:`origin-post-quantum-encryption`,describe:`Enable post-quantum key exchange for connections between Cloudflare and your origin server`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,n as d}from"./prompt-CpZztV8c.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
3
+
4
+ List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List Hostname Associations`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a})),{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
5
+
6
+ Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed.`).option(`certificate`,{type:`string`,description:`The hostname certificate.`}).option(`private-key`,{type:`string`,description:`The hostname certificate's private key.`}).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:`Upload a Hostname Client Certificate`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)});n(await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
7
+
8
+ Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with \`enabled\` set to null. After invalidating the association, the certificate can be safely deleted.`).positional(`certificate-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 y={command:`delete <certificate-id>`,describe:`Delete Hostname Client Certificate`,builder:v,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
9
+ `);return}n(await i(`Deleting`,async()=>a.originTlsClientAuth.hostnameCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates get <certificate-id>
10
+
11
+ Get the certificate by ID to be used for client authentication on a hostname.`).positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <certificate-id>`,describe:`Get the Hostname Client Certificate`,builder:b,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.hostnameCertificates.get({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates list
12
+
13
+ Lists all client certificates configured for per-hostname authenticated origin pulls on the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Certificates`,builder:S,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.hostnameCertificates.list({zone_id:s})),{successLabel:`Loaded`})})},w={command:`hostname-certificates`,describe:`Operations for hostname-certificates`,builder:e=>e.command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 origin-tls-client-auth hostnames get <hostname>
14
+
15
+ Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled.`).positional(`hostname`,{type:`string`,description:`The hostname on the origin for which the client certificate uploaded will be used.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <hostname>`,describe:`Get the Hostname Status for Client Authentication`,builder:T,handler:async o=>a({command:`origin-tls-client-auth hostnames get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/${o.hostname==null?`<hostname>`:encodeURIComponent(String(o.hostname))}`,pathParams:{hostname:String(o.hostname??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.hostnames.get({zone_id:s,hostname:o.hostname})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 origin-tls-client-auth hostnames update
16
+
17
+ Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter *enabled* to invalidate the association.`).option(`config`,{type:`string`,description:`The config field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`update`,describe:`Enable or Disable a Hostname for Client Authentication`,builder:D,handler:async l=>a({command:`origin-tls-client-auth hostnames update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf origin-tls-client-auth hostnames update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({config:s(l.config,`config`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.originTlsClientAuth.hostnames.update({...e,zone_id:u})),{successLabel:`Updated`});return}if(l.config===void 0)throw Error(`--config is required (or pass --body with this field set).`);let d=c({config:s(l.config,`config`)});n(await i(`Updating`,async()=>a.originTlsClientAuth.hostnames.update({...d,zone_id:u})),{successLabel:`Updated`})})},k={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 origin-tls-client-auth settings get
18
+
19
+ Get whether zone-level authenticated origin pulls is enabled or not. It is false by default.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Get Enablement Setting for Zone`,builder:A,handler:async o=>a({command:`origin-tls-client-auth settings get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.settings.get({zone_id:s})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 origin-tls-client-auth settings update
20
+
21
+ Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use.`).option(`enabled`,{type:`boolean`,description:`Indicates whether zone-level authenticated origin pulls is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update`,describe:`Set Enablement for Zone`,builder:M,handler:async s=>a({command:`origin-tls-client-auth settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({enabled:s.enabled}):o(s.body)});return}let a=await t(s),l=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(s.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=c({enabled:s.enabled});n(await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...u,zone_id:l})),{successLabel:`Updated`})})},P={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 origin-tls-client-auth zone-certificates create
22
+
23
+ Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use.`).option(`certificate`,{type:`string`,description:`The zone's leaf certificate.`}).option(`private-key`,{type:`string`,description:`The zone's private key.`}).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 I={command:`create`,describe:`Upload Certificate`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)});n(await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function L(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
24
+
25
+ Removes a client certificate used for zone-level authenticated origin pulls.`).positional(`certificate-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 R={command:`delete <certificate-id>`,describe:`Delete Certificate`,builder:L,handler:async o=>a({command:`origin-tls-client-auth zone-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
26
+ `);return}n(await i(`Deleting`,async()=>a.originTlsClientAuth.zoneCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 origin-tls-client-auth zone-certificates get <certificate-id>
27
+
28
+ Retrieves details for a specific client certificate used in zone-level authenticated origin pulls.`).positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <certificate-id>`,describe:`Get Certificate Details`,builder:z,handler:async o=>a({command:`origin-tls-client-auth zone-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.zoneCertificates.get({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 origin-tls-client-auth zone-certificates list
29
+
30
+ Lists all client certificates configured for zone-level authenticated origin pulls.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List Certificates`,builder:V,handler:async o=>a({command:`origin-tls-client-auth zone-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.zoneCertificates.list({zone_id:s})),{successLabel:`Loaded`})})},U={command:`zone-certificates`,describe:`Operations for zone-certificates`,builder:e=>e.command(I).command(R).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`origin-tls-client-auth`,describe:`origin-tls-client-auth`,builder:e=>e.command(h).command(w).command(k).command(P).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{W as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./Page-C-JHZnIy.mjs";import{n as t,r as n,t as r}from"./theme-CeVf-5qG.mjs";function i(t){return t instanceof e?t.data:typeof t==`object`&&t&&`result`in t&&Array.isArray(t.result)&&`result_info`in t?t.result:t}function a(e,n={}){if(!n.quiet){if(e=i(e),e==null){if(n.successLabel&&process.stderr.isTTY){let e=t();process.stderr.write(`${e.hex(r.success)(`✓`)} ${n.successLabel}\n`)}return}console.log(o(e))}}function o(e){let r=JSON.stringify(e,null,2);if(!n()||r.length>5e4)return r;let i=t();return r.replace(/"([^"]+)":/g,(e,t)=>`${i.cyan(`"${t}"`)}:`).replace(/: "([^"]*)"/g,(e,t)=>`: ${i.green(`"${t}"`)}`).replace(/: (-?\d+\.?\d*)/g,(e,t)=>`: ${i.yellow(t)}`).replace(/: (true|false)/g,(e,t)=>`: ${i.magenta(t)}`).replace(/: (null)/g,(e,t)=>`: ${i.dim(t)}`)}export{a as t};
2
+ import{t as e}from"./Page-C-JHZnIy.mjs";import{n as t,r as n,t as r}from"./theme-BiIYWOed.mjs";function i(t){return t instanceof e?t.data:typeof t==`object`&&t&&`result`in t&&Array.isArray(t.result)&&`result_info`in t?t.result:t}function a(e,n={}){if(!n.quiet){if(e=i(e),e==null){if(n.successLabel&&process.stderr.isTTY){let e=t();process.stderr.write(`${e.hex(r.success)(`✓`)} ${n.successLabel}\n`)}return}console.log(o(e))}}function o(e){let r=JSON.stringify(e,null,2);if(!n()||r.length>5e4)return r;let i=t();return r.replace(/"([^"]+)":/g,(e,t)=>`${i.cyan(`"${t}"`)}:`).replace(/: "([^"]*)"/g,(e,t)=>`: ${i.green(`"${t}"`)}`).replace(/: (-?\d+\.?\d*)/g,(e,t)=>`: ${i.yellow(t)}`).replace(/: (true|false)/g,(e,t)=>`: ${i.magenta(t)}`).replace(/: (null)/g,(e,t)=>`: ${i.dim(t)}`)}export{a as t};
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{n as u}from"./prompt-CpZztV8c.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 page-rules create
3
+
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
+ request. Actions can redirect to another URL or override settings, but
6
+ not both.
7
+ . Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
8
+ over another. A higher number indicates a higher priority. For example,
9
+ if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
10
+ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
11
+ specify a higher priority for rule B so it overrides rule A.
12
+ `,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).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 p={command:`create`,describe:`Create a Page Rule`,builder:f,handler:async u=>a({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.pageRules.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)});n(await i(`Creating`,async()=>a.pageRules.create({...f,zone_id:d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 page-rules delete <pagerule-id>
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 h={command:`delete <pagerule-id>`,describe:`Delete a Page Rule`,builder:m,handler:async o=>a({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
15
+ `);return}n(await i(`Deleting`,async()=>a.pageRules.delete({zone_id:s,pagerule_id:o[`pagerule-id`]})),{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 page-rules edit <pagerule-id>
16
+
17
+ 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
+ request. Actions can redirect to another URL or override settings, but
19
+ not both.
20
+ . Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
21
+ over another. A higher number indicates a higher priority. For example,
22
+ if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
23
+ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
24
+ specify a higher priority for rule B so it overrides rule A.
25
+ `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).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 _={command:`edit <pagerule-id>`,describe:`Edit a Page Rule`,builder:g,handler:async u=>a({command:`page-rules edit`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules/${u[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(u[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(u[`pagerule-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.pageRules.edit({...e,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`});return}let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)});n(await i(`Updating`,async()=>a.pageRules.edit({...f,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`})})};function v(e){return e.usage(`$0 page-rules get <pagerule-id>
26
+
27
+ Fetches the details of a 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})}const y={command:`get <pagerule-id>`,describe:`Get a Page Rule`,builder:v,handler:async o=>a({command:`page-rules get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf page-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.pageRules.get({zone_id:s,pagerule_id:o[`pagerule-id`]})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 page-rules list
28
+
29
+ Fetches Page Rules in a zone.`).option(`order`,{type:`string`,description:`The field used to sort returned Page Rules.`,choices:[`status`,`priority`]}).option(`direction`,{type:`string`,description:`The direction used to sort returned Page Rules.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:"When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Page Rules`,builder:d(b),handler:async o=>a({command:`page-rules list`,classification:{safeFlags:[`order`,`direction`,`match`,`status`,`dry-run`]}},o,async()=>{let a={order:o.order,direction:o.direction,match:o.match,status:o.status};if(o.dryRun){r({command:`cf page-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.pageRules.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 page-rules update <pagerule-id>
30
+
31
+ Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.`).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
32
+ request. Actions can redirect to another URL or override settings, but
33
+ not both.
34
+ . Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
35
+ over another. A higher number indicates a higher priority. For example,
36
+ if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
37
+ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
38
+ specify a higher priority for rule B so it overrides rule A.
39
+ `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).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 C={command:`update <pagerule-id>`,describe:`Update a Page Rule`,builder:S,handler:async u=>a({command:`page-rules update`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules/${u[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(u[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(u[`pagerule-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.pageRules.update({...e,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`});return}if(u.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)});n(await i(`Updating`,async()=>a.pageRules.update({...f,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`})})},w={command:`page-rules`,describe:`page-rules`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f,t as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g}from"./prompt-CpZztV8c.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function _(e){return e.usage(`$0 pages projects connect-source <project-name>
3
+
4
+ Connect a Git repository source to an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
5
+ When disabled, no deployments (production or preview) will be triggered automatically.
6
+ `}).option(`config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configs for the project source control.`})}const v={command:`connect-source <project-name>`,describe:`Connect project source`,builder:_,handler:async r=>c({command:`pages projects connect-source`,classification:{safeFlags:[`config-deployments-enabled`,`config-pr-comments-enabled`,`config-preview-deployment-setting`,`config-production-deployments-enabled`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects connect-source`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/source`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({config:{deployments_enabled:r[`config-deployments-enabled`],owner:f(r[`config-owner`],`config-owner`,`text`),owner_id:f(r[`config-owner-id`],`config-owner-id`,`text`),path_excludes:r[`config-path-excludes`],path_includes:r[`config-path-includes`],pr_comments_enabled:r[`config-pr-comments-enabled`],preview_branch_excludes:r[`config-preview-branch-excludes`],preview_branch_includes:r[`config-preview-branch-includes`],preview_deployment_setting:f(r[`config-preview-deployment-setting`],`config-preview-deployment-setting`,`text`),production_branch:f(r[`config-production-branch`],`config-production-branch`,`text`),production_deployments_enabled:r[`config-production-deployments-enabled`],repo_id:f(r[`config-repo-id`],`config-repo-id`,`text`),repo_name:f(r[`config-repo-name`],`config-repo-name`,`text`)},type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.connectSource({body:e,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`});return}if(r[`config-deployments-enabled`]===void 0)throw Error(`--config-deployments-enabled is required (or pass --body with this field set).`);if(r[`config-owner`]===void 0&&(r[`config-owner`]=await m(`config-owner`,`The owner of the repository.`)),r[`config-owner-id`]===void 0&&(r[`config-owner-id`]=await m(`config-owner-id`,`The owner ID of the repository.`)),r[`config-path-excludes`]===void 0)throw Error(`--config-path-excludes is required (or pass --body with this field set).`);if(r[`config-path-includes`]===void 0)throw Error(`--config-path-includes is required (or pass --body with this field set).`);if(r[`config-pr-comments-enabled`]===void 0)throw Error(`--config-pr-comments-enabled is required (or pass --body with this field set).`);if(r[`config-preview-branch-excludes`]===void 0)throw Error(`--config-preview-branch-excludes is required (or pass --body with this field set).`);if(r[`config-preview-branch-includes`]===void 0)throw Error(`--config-preview-branch-includes is required (or pass --body with this field set).`);if(r[`config-preview-deployment-setting`]===void 0&&(r[`config-preview-deployment-setting`]=await h(`config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),r[`config-production-branch`]===void 0&&(r[`config-production-branch`]=await m(`config-production-branch`,`The production branch of the repository.`)),r[`config-production-deployments-enabled`]===void 0)throw Error(`--config-production-deployments-enabled is required (or pass --body with this field set).`);r[`config-repo-id`]===void 0&&(r[`config-repo-id`]=await m(`config-repo-id`,`The ID of the repository.`)),r[`config-repo-name`]===void 0&&(r[`config-repo-name`]=await m(`config-repo-name`,`The name of the repository.`)),r.type===void 0&&(r.type=await h(`type`,`The source control management provider.`,[`github`,`gitlab`]));let p=d({config:{deployments_enabled:r[`config-deployments-enabled`],owner:f(r[`config-owner`],`config-owner`,`text`),owner_id:f(r[`config-owner-id`],`config-owner-id`,`text`),path_excludes:r[`config-path-excludes`],path_includes:r[`config-path-includes`],pr_comments_enabled:r[`config-pr-comments-enabled`],preview_branch_excludes:r[`config-preview-branch-excludes`],preview_branch_includes:r[`config-preview-branch-includes`],preview_deployment_setting:f(r[`config-preview-deployment-setting`],`config-preview-deployment-setting`,`text`),production_branch:f(r[`config-production-branch`],`config-production-branch`,`text`),production_deployments_enabled:r[`config-production-deployments-enabled`],repo_id:f(r[`config-repo-id`],`config-repo-id`,`text`),repo_name:f(r[`config-repo-name`],`config-repo-name`,`text`)},type:f(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.pages.projects.connectSource({body:p,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 pages projects create
7
+
8
+ Create a new project.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name of the project.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
9
+ When disabled, no deployments (production or preview) will be triggered automatically.
10
+ `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].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 --source-* flag is set`)}return!0})}const b={command:`create`,describe:`Create project`,builder:y,handler:async r=>c({command:`pages projects create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.create({...e,account_id:u})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`Name of the project.`)),r[`production-branch`]===void 0&&(r[`production-branch`]=await m(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let p=d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}});a(await s(`Creating`,async()=>c.pages.projects.create({...p,account_id:u})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 pages projects delete <project-name>
11
+
12
+ Delete a project by name.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 S={command:`delete <project-name>`,describe:`Delete project`,builder:x,handler:async r=>c({command:`pages projects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
13
+ `);return}a(await s(`Deleting`,async()=>c.pages.projects.delete({account_id:l,project_name:r[`project-name`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 pages projects deployments create <project-name>
14
+
15
+ Start a new deployment from production. The repository and account must have already been authorized on the Cloudflare Pages dashboard.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`branch`,{type:`string`,description:"The branch to build the new deployment from. The `HEAD` of the branch will be used. If omitted, the production branch will be used by default."}).option(`commit-dirty`,{type:`string`,description:`Boolean string indicating if the working directory has uncommitted changes.`}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with this deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with this deployment.`}).option(`manifest`,{type:`string`,description:`JSON string containing a manifest of files to deploy. Maps file paths to their content hashes. Required for direct upload deployments. Maximum 20,000 entries. `}).option(`pages-build-output-dir`,{type:`string`,description:`The build output directory path.`}).option(`wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration file used for this deployment.`})}const w={command:`create <project-name>`,describe:`Create deployment`,builder:C,handler:async l=>c({command:`pages projects deployments create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf pages projects deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${l[`project-name`]==null?`<project-name>`:encodeURIComponent(String(l[`project-name`]))}/deployments`,pathParams:{"project-name":String(l[`project-name`]??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file,branch:l.branch,"commit-dirty":l[`commit-dirty`],"commit-hash":l[`commit-hash`],"commit-message":l[`commit-message`],manifest:l.manifest,"pages-build-output-dir":l[`pages-build-output-dir`],"wrangler-config-hash":l[`wrangler-config-hash`]}});return}let c=await i(l),u=l.local?e:await t();if(l.accountId=u,l.file!==void 0||l.body!==void 0||l.branch!==void 0||l[`commit-dirty`]!==void 0||l[`commit-hash`]!==void 0||l[`commit-message`]!==void 0||l.manifest!==void 0||l[`pages-build-output-dir`]!==void 0||l[`wrangler-config-hash`]!==void 0){let e=new FormData;if(l.file){let t=p(l.file);e.append(`_headers`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`_headers`,l.body);l.branch!==void 0&&e.append(`branch`,String(f(l.branch,`branch`,`text`)??``)),l[`commit-dirty`]!==void 0&&e.append(`commit_dirty`,String(f(l[`commit-dirty`],`commit-dirty`,`text`)??``)),l[`commit-hash`]!==void 0&&e.append(`commit_hash`,String(f(l[`commit-hash`],`commit-hash`,`text`)??``)),l[`commit-message`]!==void 0&&e.append(`commit_message`,String(f(l[`commit-message`],`commit-message`,`text`)??``)),l.manifest!==void 0&&e.append(`manifest`,String(f(l.manifest,`manifest`,`text`)??``)),l[`pages-build-output-dir`]!==void 0&&e.append(`pages_build_output_dir`,String(f(l[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),l[`wrangler-config-hash`]!==void 0&&e.append(`wrangler_config_hash`,String(f(l[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``)),a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(l[`project-name`]))}/deployments`,{body:e})),{successLabel:`Created`});return}if(l.body){let e=f(l.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(l[`project-name`]))}/deployments`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>c.pages.projects.deployments.create({account_id:u,project_name:l[`project-name`]})),{successLabel:`Created`})})};function T(e){return e.usage(`$0 pages projects deployments delete <deployment-id>
16
+
17
+ Delete a deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`force`,{type:`boolean`,description:`Allow deletion of aliased non-production deployments when a normal delete would be rejected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`delete <deployment-id>`,describe:`Delete deployment`,builder:T,handler:async r=>c({command:`pages projects deployments delete`,classification:{safeFlags:[`force`,`dry-run`]}},r,async()=>{let c={force:r.force};if(r.dryRun){o({command:`cf pages projects deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await g({force:!!r.force})){process.stderr.write(`Aborted.
18
+ `);return}a(await s(`Deleting`,async()=>l.pages.projects.deployments.delete({account_id:u,project_name:r[`project-name`],deployment_id:r[`deployment-id`],...c})),{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 pages projects deployments get <deployment-id>
19
+
20
+ Fetch information about a deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <deployment-id>`,describe:`Get deployment info`,builder:D,handler:async r=>c({command:`pages projects deployments get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.deployments.get({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 pages projects deployments history logs get <deployment-id>
21
+
22
+ Fetch deployment logs for a project.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <deployment-id>`,describe:`Get deployment logs`,builder:k,handler:async r=>c({command:`pages projects deployments history logs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/history/logs`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.deployments.history.logs.get({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Loaded`})})},j={command:`logs`,describe:`Operations for projects.deployments.history.logs`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`history`,describe:`Operations for projects.deployments.history`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 pages projects deployments list
23
+
24
+ Fetch a list of project deployments.`).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`env`,{type:`string`,description:`What type of deployments to fetch.`,choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Which page of deployments to fetch.`}).option(`per-page`,{type:`number`,description:`How many deployments to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`Get deployments`,builder:ee(N),handler:async r=>c({command:`pages projects deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},r,async()=>{let c={env:r.env,page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pages projects deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments`,pathParams:{"project-name":String(r[`project-name`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.pages.projects.deployments.list({account_id:u,project_name:r[`project-name`],...c})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 pages projects deployments retry <deployment-id>
25
+
26
+ Retry a previous deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`retry <deployment-id>`,describe:`Retry deployment`,builder:F,handler:async r=>c({command:`pages projects deployments retry`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/retry`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.pages.projects.deployments.retry({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`})})};function L(e){return e.usage(`$0 pages projects deployments rollback <deployment-id>
27
+
28
+ Rollback the production deployment to a previous deployment. You can only rollback to succesful builds on production.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`rollback <deployment-id>`,describe:`Rollback deployment`,builder:L,handler:async r=>c({command:`pages projects deployments rollback`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/rollback`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.pages.projects.deployments.rollback({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 pages projects deployments tails create <deployment-id>
29
+
30
+ Start a tail that receives logs and exception data.`).positional(`deployment-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply to the tail session. 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 B={command:`create <deployment-id>`,describe:`Create deployment tail`,builder:z,handler:async r=>c({command:`pages projects deployments tails create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments tails create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/tails`,pathParams:{"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({filters:u(r.filters,`filters`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.deployments.tails.create({...e,account_id:f,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`});return}let p=d({filters:u(r.filters,`filters`)});a(await s(`Creating`,async()=>c.pages.projects.deployments.tails.create({...p,account_id:f,project_name:r[`project-name`],deployment_id:r[`deployment-id`]})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 pages projects deployments tails delete <tail-id>
31
+
32
+ Deletes a tail from a Pages deployment.`).positional(`tail-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`deployment-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 V={command:`delete <tail-id>`,describe:`Delete deployment tail`,builder:te,handler:async r=>c({command:`pages projects deployments tails delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects deployments tails delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/deployments/${r[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(r[`deployment-id`]))}/tails/${r[`tail-id`]==null?`<tail-id>`:encodeURIComponent(String(r[`tail-id`]))}`,pathParams:{"tail-id":String(r[`tail-id`]??``),"deployment-id":String(r[`deployment-id`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
33
+ `);return}a(await s(`Deleting`,async()=>c.pages.projects.deployments.tails.delete({account_id:l,project_name:r[`project-name`],deployment_id:r[`deployment-id`],tail_id:r[`tail-id`]})),{successLabel:`Deleted`})})},H={command:`tails`,describe:`Operations for projects.deployments.tails`,builder:e=>e.command(B).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`deployments`,describe:`Operations for projects.deployments`,builder:e=>e.command(w).command(E).command(O).command(P).command(I).command(R).command(M).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 pages projects disconnect-source <project-name>
34
+
35
+ Disconnect the Git repository source from an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const G={command:`disconnect-source <project-name>`,describe:`Disconnect project source`,builder:W,handler:async r=>c({command:`pages projects disconnect-source`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects disconnect-source`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/source`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
36
+ `);return}a(await s(`Deleting`,async()=>c.pages.projects.disconnectSource({account_id:l,project_name:r[`project-name`]})),{successLabel:`Deleted`})})};function K(e){return e.usage(`$0 pages projects domains create <project-name>
37
+
38
+ Add a new domain for the Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`name`,{type:`string`,description:`The domain name.`}).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 q={command:`create <project-name>`,describe:`Add domain`,builder:K,handler:async r=>c({command:`pages projects domains create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.pages.projects.domains.create({...e,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`The domain name.`));let p=d({name:f(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.pages.projects.domains.create({...p,account_id:u,project_name:r[`project-name`]})),{successLabel:`Created`})})};function J(e){return e.usage(`$0 pages projects domains delete <domain-name>
39
+
40
+ Delete a Pages project's domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Y={command:`delete <domain-name>`,describe:`Delete domain`,builder:J,handler:async r=>c({command:`pages projects domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
41
+ `);return}a(await s(`Deleting`,async()=>c.pages.projects.domains.delete({account_id:l,project_name:r[`project-name`],domain_name:r[`domain-name`]})),{successLabel:`Deleted`})})};function X(e){return e.usage(`$0 pages projects domains edit <domain-name>
42
+
43
+ Retry the validation status of a single domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`edit <domain-name>`,describe:`Patch domain`,builder:X,handler:async r=>c({command:`pages projects domains edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Updating`,async()=>c.pages.projects.domains.edit({account_id:l,project_name:r[`project-name`],domain_name:r[`domain-name`]})),{successLabel:`Updated`})})};function Q(e){return e.usage(`$0 pages projects domains get <domain-name>
44
+
45
+ Fetch a single domain.`).positional(`domain-name`,{type:`string`,description:`The domain name.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <domain-name>`,describe:`Get domain`,builder:Q,handler:async r=>c({command:`pages projects domains get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains/${r[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(r[`domain-name`]))}`,pathParams:{"domain-name":String(r[`domain-name`]??``),"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.domains.get({account_id:l,project_name:r[`project-name`],domain_name:r[`domain-name`]})),{successLabel:`Loaded`})})};function re(e){return e.usage(`$0 pages projects domains list
46
+
47
+ Fetch a list of all domains associated with a Pages project.`).option(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`list`,describe:`Get domains`,builder:re,handler:async r=>c({command:`pages projects domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/domains`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.domains.list({account_id:l,project_name:r[`project-name`]})),{successLabel:`Loaded`})})},ae={command:`domains`,describe:`Operations for projects.domains`,builder:e=>e.command(q).command(Y).command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 pages projects edit <project-name>
48
+
49
+ Set new attributes for an existing project. Modify environment variables. To delete an environment variable, set the key to null.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name of the project.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
50
+ When disabled, no deployments (production or preview) will be triggered automatically.
51
+ `}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].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 --source-* flag is set`)}return!0})}const $={command:`edit <project-name>`,describe:`Update project`,builder:oe,handler:async r=>c({command:`pages projects edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`json`,body:r.body===void 0?d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.pages.projects.edit({...e,account_id:u,project_name:r[`project-name`]})),{successLabel:`Updated`});return}let p=d({build_config:{build_caching:r[`build-config-build-caching`],build_command:f(r[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(r[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(r[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(r[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(r[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:r[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(r[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-preview-compatibility-flags`],fail_open:r[`deployment-configs-preview-fail-open`],limits:{cpu_ms:r[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:r[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:r[`deployment-configs-production-build-image-major-version`],compatibility_date:f(r[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:r[`deployment-configs-production-compatibility-flags`],fail_open:r[`deployment-configs-production-fail-open`],limits:{cpu_ms:r[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(r[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(r[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(r[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(r.name,`name`,`text`),production_branch:f(r[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:r[`source-config-deployments-enabled`],owner:f(r[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(r[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:r[`source-config-path-excludes`],path_includes:r[`source-config-path-includes`],pr_comments_enabled:r[`source-config-pr-comments-enabled`],preview_branch_excludes:r[`source-config-preview-branch-excludes`],preview_branch_includes:r[`source-config-preview-branch-includes`],preview_deployment_setting:f(r[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(r[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:r[`source-config-production-deployments-enabled`],repo_id:f(r[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(r[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(r[`source-type`],`source-type`,`text`)}});a(await s(`Updating`,async()=>c.pages.projects.edit({...p,account_id:u,project_name:r[`project-name`]})),{successLabel:`Updated`})})};function se(e){return e.usage(`$0 pages projects get-upload-token <project-name>
52
+
53
+ Get a short-lived JWT for Pages Direct Upload asset operations.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get-upload-token <project-name>`,describe:`Get upload token`,builder:se,handler:async r=>c({command:`pages projects get-upload-token`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects get-upload-token`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/upload-token`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.getUploadToken({account_id:l,project_name:r[`project-name`]})),{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 pages projects get <project-name>
54
+
55
+ Fetch a project by name.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <project-name>`,describe:`Get project`,builder:le,handler:async r=>c({command:`pages projects get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf pages projects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.pages.projects.get({account_id:l,project_name:r[`project-name`]})),{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 pages projects list
56
+
57
+ Fetch a list of all user projects.`).option(`page`,{type:`number`,description:`Which page of projects to fetch.`}).option(`per-page`,{type:`number`,description:`How many projects to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`Get projects`,builder:de,handler:async r=>c({command:`pages projects list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pages projects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.pages.projects.list({account_id:u,...c})),{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 pages projects purge-build-cache <project-name>
58
+
59
+ Purge all cached build artifacts for a Pages project`).positional(`project-name`,{type:`string`,description:`Name of the project.`,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 me={command:`purge-build-cache <project-name>`,describe:`Purge build cache`,builder:pe,handler:async r=>c({command:`pages projects purge-build-cache`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf pages projects purge-build-cache`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pages/projects/${r[`project-name`]==null?`<project-name>`:encodeURIComponent(String(r[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(r[`project-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
60
+ `);return}a(await s(`Deleting`,async()=>c.pages.projects.purgeBuildCache({account_id:l,project_name:r[`project-name`]})),{successLabel:`Deleted`})})},he={command:`projects`,describe:`Pages projects, deployments, build logs, and custom domain bindings`,builder:e=>e.command(v).command(b).command(S).command(G).command($).command(ue).command(ce).command(fe).command(me).command(U).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ge as default};
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-CpZztV8c.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
3
+
4
+ Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:te,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.payPerCrawl.config.create({...t,zone_id:r})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]});a(await s(`Creating`,async()=>n.payPerCrawl.config.create({...c,zone_id:r})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pay-per-crawl config edit
5
+
6
+ Changes the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const v={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:_,handler:async e=>c({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:t,zone_id:r})),{successLabel:`Updated`});return}let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]});a(await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:c,zone_id:r})),{successLabel:`Updated`})})};function y(e){return e.usage(`$0 pay-per-crawl config get
7
+
8
+ Gets the pay-per-crawl config for a zone including the bot configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get the pay-per-crawl config`,builder:y,handler:async e=>c({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.payPerCrawl.config.get({zone_id:r})),{successLabel:`Loaded`})})},x={command:`config`,describe:`Operations for config`,builder:e=>e.command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 pay-per-crawl crawler stripe create
9
+
10
+ Creates the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`create`,describe:`Creates the stripe config for a crawler`,builder:S,handler:async t=>c({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl crawler stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Creating`,async()=>c.payPerCrawl.crawler.stripe.create({account_id:l})),{successLabel:`Created`})})};function w(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
11
+
12
+ Deletes the stripe config for a crawler.`).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 T={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:w,handler:async t=>c({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl crawler stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();if(t.accountId=l,!await h({force:!!t.force})){process.stderr.write(`Aborted.
13
+ `);return}a(await s(`Deleting`,async()=>c.payPerCrawl.crawler.stripe.delete({account_id:l})),{successLabel:`Deleted`})})};function E(e){return e.usage(`$0 pay-per-crawl crawler stripe get
14
+
15
+ Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get`,describe:`Gets the stripe config for a crawler`,builder:E,handler:async t=>c({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl crawler stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.payPerCrawl.crawler.stripe.get({account_id:l})),{successLabel:`Loaded`})})},O={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},k={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 pay-per-crawl crawlers list
16
+
17
+ Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List pay-per-crawl crawlers`,builder:A,handler:async t=>c({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl crawlers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/crawlers`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.payPerCrawl.crawlers.list({account_id:l})),{successLabel:`Loaded`})})},M={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 pay-per-crawl pay-per-use operator get-configuration
18
+
19
+ Gets the pay-per-use operator configuration for an account, including its read-only non-billable classification timestamp.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get-configuration`,describe:`Get pay-per-use operator configuration`,builder:N,handler:async t=>c({command:`pay-per-crawl pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl pay-per-use operator get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.payPerCrawl.payPerUse.operator.getConfiguration({account_id:l})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 pay-per-crawl pay-per-use operator set-configuration
20
+
21
+ Creates or updates the pay-per-use operator configuration for an account. Creating an enabled configuration or re-enabling a disabled operator requires completed Stripe onboarding; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration`})}const I={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:F,handler:async t=>c({command:`pay-per-crawl pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl pay-per-use operator set-configuration`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:f(t.name,`name`,`text`)}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.setConfiguration({body:e,account_id:u})),{successLabel:`Updated`});return}if(t[`default-price-usd-microcents`]===void 0)throw Error(`--default-price-usd-microcents is required (or pass --body with this field set).`);if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await p(`name`,`The name field`));let m=d({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:f(t.name,`name`,`text`)});a(await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.setConfiguration({body:m,account_id:u})),{successLabel:`Updated`})})};function L(e){return e.usage(`$0 pay-per-crawl pay-per-use operator update-configuration
22
+
23
+ Updates one or more fields of an existing pay-per-use operator configuration. Re-enabling a disabled operator requires completed Stripe onboarding; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration update`})}const R={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:L,handler:async t=>c({command:`pay-per-crawl pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl pay-per-use operator update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:f(t.name,`name`,`text`)}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.updateConfiguration({...e,account_id:u})),{successLabel:`Updated`});return}let p=d({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:f(t.name,`name`,`text`)});a(await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.updateConfiguration({...p,account_id:u})),{successLabel:`Updated`})})},z={command:`operator`,describe:`Operations for pay-per-use.operator`,builder:e=>e.command(P).command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.usage(`$0 pay-per-crawl pay-per-use pricing list-operators
24
+
25
+ Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list-operators`,describe:`List pay-per-use operators`,builder:B,handler:async e=>c({command:`pay-per-crawl pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use pricing list-operators`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.payPerCrawl.payPerUse.pricing.listOperators({zone_id:c,...n})),{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 pay-per-crawl pay-per-use pricing opt-out-operator-price <operator-id>
26
+
27
+ Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator 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 U={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:H,handler:async e=>c({command:`pay-per-crawl pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use pricing opt-out-operator-price`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await h({force:!!e.force})){process.stderr.write(`Aborted.
28
+ `);return}a(await s(`Deleting`,async()=>n.payPerCrawl.payPerUse.pricing.optOutOperatorPrice({zone_id:r,operator_id:e[`operator-id`]})),{successLabel:`Deleted`})})};function W(e){return e.usage(`$0 pay-per-crawl pay-per-use pricing set-operator-price <operator-id>
29
+
30
+ Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const G={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:W,handler:async e=>c({command:`pay-per-crawl pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use pricing set-operator-price`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({action:f(e.action,`action`,`text`),price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.payPerCrawl.payPerUse.pricing.setOperatorPrice({body:t,zone_id:r,operator_id:e[`operator-id`]})),{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await m(`action`,`The action field`,[`propose`,`withdraw`,`accept_default`,`resume`])),e.action===`propose`&&e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({action:f(e.action,`action`,`text`),price_usd_microcents:e[`price-usd-microcents`]});a(await s(`Creating`,async()=>n.payPerCrawl.payPerUse.pricing.setOperatorPrice({body:c,zone_id:r,operator_id:e[`operator-id`]})),{successLabel:`Created`})})},K={command:`pricing`,describe:`Operations for pay-per-use.pricing`,builder:e=>e.command(V).command(U).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 pay-per-crawl pay-per-use proposals decide
31
+
32
+ Accepts or rejects the pending pay-per-use price proposal identified by price_id in the request body. Acceptance requires an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications; rejection remains available for cleanup.`).option(`action`,{type:`string`,description:`The action field`,choices:[`accept`,`reject`]}).option(`price-id`,{type:`number`,description:`Pending pay-per-use price id returned in the operator proposal queue.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator proposal decision`})}const J={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:q,handler:async t=>c({command:`pay-per-crawl pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl pay-per-use proposals decide`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-use/proposals`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({action:f(t.action,`action`,`text`),price_id:t[`price-id`]}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.payPerCrawl.payPerUse.proposals.decide({...e,account_id:u})),{successLabel:`Created`});return}if(t.action===void 0&&(t.action=await m(`action`,`The action field`,[`accept`,`reject`])),t[`price-id`]===void 0)throw Error(`--price-id is required (or pass --body with this field set).`);let p=d({action:f(t.action,`action`,`text`),price_id:t[`price-id`]});a(await s(`Creating`,async()=>c.payPerCrawl.payPerUse.proposals.decide({...p,account_id:u})),{successLabel:`Created`})})};function Y(e){return e.usage(`$0 pay-per-crawl pay-per-use proposals list
33
+
34
+ Lists a paginated set of outstanding pay-per-use publisher price proposals for an operator. Listing remains available while the operator is disabled or its name is unverified so proposals can be rejected.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List pay-per-use price proposals`,builder:Y,handler:async t=>c({command:`pay-per-crawl pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`]};if(t.dryRun){o({command:`cf pay-per-crawl pay-per-use proposals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-use/proposals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await n();t.accountId=u,a(await s(`Loading`,async()=>l.payPerCrawl.payPerUse.proposals.list({account_id:u,...c})),{successLabel:`Loaded`})})},Z={command:`proposals`,describe:`Operations for pay-per-use.proposals`,builder:e=>e.command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 pay-per-crawl pay-per-use usage-stats get-account
35
+
36
+ Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:Q,handler:async l=>c({command:`pay-per-crawl pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={since:l.since,until:l.until,page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf pay-per-crawl pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.payPerCrawl.payPerUse.usageStats.getAccount({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},re={command:`usage-stats`,describe:`Operations for pay-per-use.usage-stats`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.usage(`$0 pay-per-crawl pay-per-use zones get-can-be-enabled
37
+
38
+ Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:ie,handler:async e=>c({command:`pay-per-crawl pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.payPerCrawl.payPerUse.zones.getCanBeEnabled({zone_id:r})),{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 pay-per-crawl pay-per-use zones get-configuration
39
+
40
+ Gets the pay-per-use configuration, zone-level grace period, and read-only non-billable classification timestamp for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:oe,handler:async e=>c({command:`pay-per-crawl pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use zones get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.payPerCrawl.payPerUse.zones.getConfiguration({zone_id:r})),{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 pay-per-crawl pay-per-use zones set-can-be-enabled
41
+
42
+ Sets pay-per-use eligibility for a list of account zones. An omitted can_be_enabled value leaves that zone unchanged. Revoking eligibility disables the zone immediately while existing accepted licenses remain active until the start of the next UTC month.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone eligibility updates`})}const le={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:ce,handler:async t=>c({command:`pay-per-crawl pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl pay-per-use zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-use/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({zones:u(t.zones,`zones`)}):l(t.body)});return}let c=await i(t),f=t.local?e:await n();if(t.accountId=f,t.body){let e=l(t.body);a(await s(`Updating`,async()=>c.payPerCrawl.payPerUse.zones.setCanBeEnabled({...e,account_id:f})),{successLabel:`Updated`});return}if(t.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(t.zones,`zones`)});a(await s(`Updating`,async()=>c.payPerCrawl.payPerUse.zones.setCanBeEnabled({...p,account_id:f})),{successLabel:`Updated`})})};function ue(e){return e.usage(`$0 pay-per-crawl pay-per-use zones update-configuration
43
+
44
+ Enables or disables an existing pay-per-use zone configuration. Omitting enabled leaves the zone unchanged. Enabling a disabled zone requires completed publisher Stripe onboarding; an already-enabled zone is not affected by later Stripe status changes. Disabling starts a disabled period immediately while existing accepted licenses remain active until the start of the next UTC month; re-enabling before expiry clears the schedule and restores those licenses.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone configuration update`})}const de={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:ue,handler:async e=>c({command:`pay-per-crawl pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use zones update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.payPerCrawl.payPerUse.zones.updateConfiguration({...t,zone_id:r})),{successLabel:`Updated`});return}let c=d({enabled:e.enabled});a(await s(`Updating`,async()=>n.payPerCrawl.payPerUse.zones.updateConfiguration({...c,zone_id:r})),{successLabel:`Updated`})})},fe={command:`zones`,describe:`Operations for pay-per-use.zones`,builder:e=>e.command(ae).command(se).command(le).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`pay-per-use`,describe:`Operations for pay-per-use`,builder:e=>e.command(z).command(K).command(Z).command(re).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 pay-per-crawl publisher stripe create
45
+
46
+ Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`create`,describe:`Creates the stripe config for a publisher`,builder:me,handler:async t=>c({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl publisher stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Creating`,async()=>c.payPerCrawl.publisher.stripe.create({account_id:l})),{successLabel:`Created`})})};function ge(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
47
+
48
+ Deletes the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _e={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:ge,handler:async t=>c({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl publisher stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();if(t.accountId=l,!await h({force:!!t.force})){process.stderr.write(`Aborted.
49
+ `);return}a(await s(`Deleting`,async()=>c.payPerCrawl.publisher.stripe.delete({account_id:l})),{successLabel:`Deleted`})})};function ve(e){return e.usage(`$0 pay-per-crawl publisher stripe get
50
+
51
+ Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get`,describe:`Gets the stripe config for a publisher`,builder:ve,handler:async t=>c({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl publisher stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.payPerCrawl.publisher.stripe.get({account_id:l})),{successLabel:`Loaded`})})},be={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
52
+
53
+ Gets a download link for the account's signed pay-per-crawl terms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:Se,handler:async t=>c({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl terms get-signature-link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/signature_link`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.payPerCrawl.terms.getSignatureLink({account_id:l})),{successLabel:`Loaded`})})};function we(e){return e.usage(`$0 pay-per-crawl terms get-signature
54
+
55
+ Gets the account's pay-per-crawl terms signature status.`).option(`remote`,{type:`boolean`,description:`Refresh the signature status from Ironclad.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:we,handler:async t=>c({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`remote`,`dry-run`]}},t,async()=>{let c={remote:t.remote};if(t.dryRun){o({command:`cf pay-per-crawl terms get-signature`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await n();t.accountId=u,a(await s(`Loading`,async()=>l.payPerCrawl.terms.getSignature({account_id:u,...c})),{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 pay-per-crawl terms get
56
+
57
+ Gets the pay-per-crawl terms and conditions contract.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get`,describe:`Get pay-per-crawl terms`,builder:Ee,handler:async t=>c({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl terms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/terms`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.payPerCrawl.terms.get({account_id:l})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 pay-per-crawl terms send-signature-event
58
+
59
+ Records that an account displayed or agreed to the pay-per-crawl terms.`).option(`event-type`,{type:`string`,description:`The terms activity to record.`,choices:[`agreed`,`displayed`],demandOption:!0}).option(`vid`,{type:`string`,description:`Ironclad contract version ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:ee($),handler:async t=>c({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},t,async()=>{let c={event_type:t[`event-type`],vid:t.vid};if(t.dryRun){o({command:`cf pay-per-crawl terms send-signature-event`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await n();t.accountId=u,a(await s(`Creating`,async()=>l.payPerCrawl.terms.sendSignatureEvent({account_id:u,...c})),{successLabel:`Created`})})},ke={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(De).command(Te).command(Ce).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage(`$0 pay-per-crawl zones get-can-be-enabled
60
+
61
+ Gets whether pay-per-crawl can be enabled for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:Ae,handler:async e=>c({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.payPerCrawl.zones.getCanBeEnabled({zone_id:r})),{successLabel:`Loaded`})})};function Me(e){return e.usage(`$0 pay-per-crawl zones query-can-be-enabled
62
+
63
+ Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not.`).option(`zones`,{type:`string`,array:!0,description:`The zones field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Zone IDs to check for pay-per-crawl eligibility`})}const Ne={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:Me,handler:async t=>c({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({zones:t.zones}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...e,account_id:u})),{successLabel:`Created`});return}let f=d({zones:t.zones});a(await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...f,account_id:u})),{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 pay-per-crawl zones set-can-be-enabled
64
+
65
+ Allows an account admin to set the can_be_enabled setting on a list of zones. An omitted can_be_enabled value leaves that zone unchanged.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const Fe={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:Pe,handler:async t=>c({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({zones:u(t.zones,`zones`)}):l(t.body)});return}let c=await i(t),f=t.local?e:await n();if(t.accountId=f,t.body){let e=l(t.body);a(await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...e,account_id:f})),{successLabel:`Updated`});return}if(t.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(t.zones,`zones`)});a(await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...p,account_id:f})),{successLabel:`Updated`})})},Ie={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(je).command(Ne).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Le={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(x).command(k).command(M).command(pe).command(xe).command(ke).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Le as default};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
3
+
4
+ Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`List enabled Pay Per Use domains`,builder:d,handler:async r=>c({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...c})),{successLabel:`Loaded`})})},p={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 pay-per-use usage-reports submit
5
+
6
+ Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const h={command:`submit`,describe:`Submit a participant usage report`,builder:m,handler:async d=>c({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}})),{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${f}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}})),{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},g={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`pay-per-use`,describe:`pay-per-use`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};