cf 0.3.0 → 0.5.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 (228) hide show
  1. package/README.md +7 -1
  2. package/dist/_meta/agent-context.json +26 -21
  3. package/dist/_meta/commands.json +7696 -18100
  4. package/dist/_meta/schemas.json +6411 -13925
  5. package/dist/{abuse-reports-dMIfUJ8v.mjs → abuse-reports-Ina5TlsU.mjs} +2 -2
  6. package/dist/{accounts-Kx1epdA1.mjs → accounts-B_joQcMi.mjs} +9 -9
  7. package/dist/{acm-Utu252kC.mjs → acm-_kIHqYME.mjs} +2 -2
  8. package/dist/{addressing-CBq7Z7Vq.mjs → addressing-CaFlw8y1.mjs} +10 -10
  9. package/dist/{agent-context-BGTU299M.mjs → agent-context-DMPfi54f.mjs} +1 -1
  10. package/dist/ai-CqnhNb_c.mjs +2 -0
  11. package/dist/ai-gateway-pgYGI519.mjs +8 -0
  12. package/dist/ai-search-eqQMPQol.mjs +7 -0
  13. package/dist/ai_gateway--vuVLnOm.mjs +4 -0
  14. package/dist/{alerting-CqmEIaKn.mjs → alerting-CPxHiYHb.mjs} +5 -5
  15. package/dist/{analytics-Dv-X8x7D.mjs → analytics-DSSRDZz8.mjs} +1 -1
  16. package/dist/analytics_engine-gWyfnsCs.mjs +2 -0
  17. package/dist/{api-gateway-CNv0IHTU.mjs → api-gateway-BXXGFCVR.mjs} +10 -10
  18. package/dist/argo-aC6A3JyX.mjs +2 -0
  19. package/dist/artifacts-HD4V2xpK.mjs +4 -0
  20. package/dist/audit-logs-BuExU_nz.mjs +2 -0
  21. package/dist/auth-CSC4yhEJ.mjs +9 -0
  22. package/dist/auth-D5hNsOFq.mjs +5 -0
  23. package/dist/billing-COaghyxl.mjs +2 -0
  24. package/dist/bot-management-DmEzeV1Y.mjs +5 -0
  25. package/dist/botnet-feed-ByEAXAkw.mjs +3 -0
  26. package/dist/brand-protection-dPrGe8sL.mjs +3 -0
  27. package/dist/browser-rendering-BiSGnpBf.mjs +4 -0
  28. package/dist/{build-DYkGW4dh.mjs → build-HuS9-R0V.mjs} +131 -131
  29. package/dist/{cache-DsoW6Xwv.mjs → cache-CY-7Lt71.mjs} +4 -4
  30. package/dist/calls-wOQGDWPl.mjs +4 -0
  31. package/dist/certificate-authorities-CtqzAtxQ.mjs +2 -0
  32. package/dist/chunk-6IEM75FG-BEjRFMGh.mjs +2 -0
  33. package/dist/client-certificates-CRf41xLe.mjs +3 -0
  34. package/dist/cloud-connector-BA5IRZUP.mjs +2 -0
  35. package/dist/{cloudforce-one-2Bhz8YdW.mjs → cloudforce-one-Bq_qPAWs.mjs} +20 -20
  36. package/dist/{completions-BwRpZQVn.mjs → completions-DOeHPdCG.mjs} +2 -2
  37. package/dist/config-B5k-XbwS.mjs +2 -0
  38. package/dist/connectivity-Bx3MgTHX.mjs +3 -0
  39. package/dist/connector-interrupts-D7ylweJZ.mjs +2 -0
  40. package/dist/connector-telemetry-events-6izV1kbP.mjs +2 -0
  41. package/dist/connector-telemetry-snapshots-BnjKbyxX.mjs +2 -0
  42. package/dist/connectors-DRt4e6d_.mjs +3 -0
  43. package/dist/content-scanning-Cd2vy5Sz.mjs +4 -0
  44. package/dist/context-jpewmual.mjs +2 -0
  45. package/dist/{custom-certificates-aAiEguR7.mjs → custom-certificates-DYE-9epx.mjs} +3 -3
  46. package/dist/{custom-hostnames-AG5yBHIi.mjs → custom-hostnames-CtuTdFcX.mjs} +4 -4
  47. package/dist/custom-nameservers-CWqA51in.mjs +3 -0
  48. package/dist/custom-pages-DeUKEFGe.mjs +4 -0
  49. package/dist/d1-DvWY9Gp4.mjs +4 -0
  50. package/dist/data-security-BPo6dIWu.mjs +6 -0
  51. package/dist/dcv-delegation-Bgf86J-r.mjs +2 -0
  52. package/dist/{deploy-CQial3kN.mjs → deploy-dVrgDUOp.mjs} +1 -1
  53. package/dist/{dev-B38LfCTl.mjs → dev-C01_Lby6.mjs} +1 -1
  54. package/dist/diagnostics-6nKPmVgz.mjs +3 -0
  55. package/dist/{dispatch-namespaces-DmHvoBOg.mjs → dispatch-namespaces-64lXx2WJ.mjs} +6 -6
  56. package/dist/dist-C6zxsVdY.mjs +306 -0
  57. package/dist/{dist-AIcZFk0U.mjs → dist-t_YrL25p.mjs} +7 -7
  58. package/dist/{dns-VMhQSr5n.mjs → dns-ClciFGxx.mjs} +13 -13
  59. package/dist/dns-firewall-DfUmXDCe.mjs +57 -0
  60. package/dist/durable-objects-CMaYZ-YU.mjs +2 -0
  61. package/dist/{email-routing-tIR2SFu-.mjs → email-routing-CGXhFqF5.mjs} +9 -9
  62. package/dist/{email-security-Ca1id3rZ.mjs → email-security-D5viPq8S.mjs} +7 -7
  63. package/dist/email-sending-C2jpc3gh.mjs +3 -0
  64. package/dist/{filters-A4dg_a68.mjs → filters-bzsFcWt0.mjs} +3 -3
  65. package/dist/{firewall-DWPQgYd9.mjs → firewall-DYZcTtIC.mjs} +10 -10
  66. package/dist/{fraud-BMkSsJGU.mjs → fraud-C03MtdZb.mjs} +1 -1
  67. package/dist/google-tag-gateway-Dfy887yA.mjs +2 -0
  68. package/dist/{healthchecks-CtIfrFql.mjs → healthchecks-DRoAlWgr.mjs} +3 -3
  69. package/dist/hostnames-CFgIVI3s.mjs +3 -0
  70. package/dist/hyperdrive-C7-gwTSV.mjs +18 -0
  71. package/dist/iam-DqVPzGrb.mjs +6 -0
  72. package/dist/images-BYfl4YgR.mjs +7 -0
  73. package/dist/index.mjs +1 -1
  74. package/dist/intel-duTEPIHc.mjs +3 -0
  75. package/dist/{ips-K4bzaGqd.mjs → ips-nv9INuWZ.mjs} +1 -1
  76. package/dist/keyless-certificates-CRCDVd3g.mjs +3 -0
  77. package/dist/{kv-8o27w_pY.mjs → kv-CZoV4tiv.mjs} +4 -4
  78. package/dist/leaked-credential-checks-DNIBg7Pe.mjs +3 -0
  79. package/dist/{load-balancers-DtG8nj25.mjs → load-balancers--OMg0HNt.mjs} +5 -5
  80. package/dist/{logpush-4L0njy1d.mjs → logpush-C0_lZTyY.mjs} +3 -3
  81. package/dist/{logs-B_Yp95hv.mjs → logs-BtpWZQfV.mjs} +2 -2
  82. package/dist/magic-cloud-networking-u6rwYbGg.mjs +5 -0
  83. package/dist/{magic-network-monitoring-BnwvM4-I.mjs → magic-network-monitoring-CKgQyRj4.mjs} +3 -3
  84. package/dist/{magic-transit-CXDyvhxq.mjs → magic-transit-CLhMcJ_-.mjs} +32 -33
  85. package/dist/managed-transforms-D0Z2mlth.mjs +3 -0
  86. package/dist/mtls-certificates-BL65NK5T.mjs +3 -0
  87. package/dist/{network-interconnects-rrr7red3.mjs → network-interconnects-Bgu9gmaG.mjs} +5 -5
  88. package/dist/oauth-Bk-F-tIO.mjs +52 -0
  89. package/dist/{observability-DWvpqnQJ.mjs → observability-BynRbTF4.mjs} +3 -3
  90. package/dist/open-YWOUIZ5Y-3jqSKAB1.mjs +4 -0
  91. package/dist/{organizations-T77D50Sq.mjs → organizations-BqJHyvMK.mjs} +3 -3
  92. package/dist/origin-ca-certificates-BGvYwm3C.mjs +3 -0
  93. package/dist/origin-post-quantum-encryption-9KOE8YPI.mjs +2 -0
  94. package/dist/{origin-tls-client-auth-CaVW1Ztp.mjs → origin-tls-client-auth-d3snC3vr.mjs} +3 -3
  95. package/dist/{output-BJFNwj7b.mjs → output-B6fBFRqe.mjs} +1 -1
  96. package/dist/{page-rules-CjZPTMQX.mjs → page-rules-EZHJePmn.mjs} +4 -4
  97. package/dist/{page-shield-D5RRNJCY.mjs → page-shield-CXJioWPs.mjs} +5 -5
  98. package/dist/{pages-CWJtJnL0.mjs → pages-D4aYteKk.mjs} +8 -8
  99. package/dist/{pipelines-B0L_7j9e.mjs → pipelines-G8Iusxq-.mjs} +5 -5
  100. package/dist/progress-DrDErV9w.mjs +2 -0
  101. package/dist/queues-DEkbKqZX.mjs +6 -0
  102. package/dist/{r2-DQIcyRtA.mjs → r2-CV0IkCAW.mjs} +9 -9
  103. package/dist/r2-data-catalog-NtqGC_a_.mjs +14 -0
  104. package/dist/radar-D986zPJr.mjs +2 -0
  105. package/dist/{rate-limits-DcrQV6Ar.mjs → rate-limits-B2wRsUX1.mjs} +3 -3
  106. package/dist/raw-fetch-_n0lMAnD.mjs +2 -0
  107. package/dist/{realtime-kit-CaquuVOE.mjs → realtime-kit-Ld3c5eU6.mjs} +9 -9
  108. package/dist/{registrar-Ko-xZemf.mjs → registrar-CDIwTz3G.mjs} +6 -6
  109. package/dist/request-tracers-D7SFMDik.mjs +2 -0
  110. package/dist/resource-sharing-YIQ04jXE.mjs +5 -0
  111. package/dist/{resource-tagging-C3qtLzCz.mjs → resource-tagging-Bd6Y03sg.mjs} +7 -7
  112. package/dist/rules-DHjLP5Kx.mjs +4 -0
  113. package/dist/{rulesets-CBgpeSvJ.mjs → rulesets-q4QABpKs.mjs} +7 -7
  114. package/dist/rum-SmT4HZmM.mjs +4 -0
  115. package/dist/{schema-D16TgWBg.mjs → schema-BR31o4P6.mjs} +1 -1
  116. package/dist/{schema-validation-Dgv_opM3.mjs → schema-validation-vVetgC_P.mjs} +5 -5
  117. package/dist/{scim-DdSEr4kZ.mjs → scim-ChOkZpNx.mjs} +2 -2
  118. package/dist/{session-COHHdS7A.mjs → sdk-DhIhH6GB.mjs} +4 -4
  119. package/dist/{secrets-store-7BfyvJLb.mjs → secrets-store-BAK9G12O.mjs} +12 -12
  120. package/dist/security-center-eScuYDKP.mjs +2 -0
  121. package/dist/security-txt-x7R4gmQu.mjs +3 -0
  122. package/dist/session-DHYCE-PM.mjs +93 -0
  123. package/dist/shared-BAjo72Lz.mjs +2 -0
  124. package/dist/{smart-shield-TeWZFnH2.mjs → smart-shield-CWlSsNi8.mjs} +2 -2
  125. package/dist/snippets-DrlgYJYp.mjs +4 -0
  126. package/dist/{spawn-DcppKGI5.mjs → spawn-CCGzKlC4.mjs} +1 -1
  127. package/dist/{spectrum-CTTZID8u.mjs → spectrum-pVGxb7u5.mjs} +6 -6
  128. package/dist/speed-ZFrMWDgd.mjs +4 -0
  129. package/dist/src-DU7FBCOX.mjs +108 -0
  130. package/dist/ssl-9JY05sYt.mjs +15 -0
  131. package/dist/stream-tRU39b8K.mjs +14 -0
  132. package/dist/{tenants-Bd7NGQ_m.mjs → tenants-HLGUazms.mjs} +1 -1
  133. package/dist/{token-validation-DAgtFOvs.mjs → token-validation-_VdamKpz.mjs} +4 -4
  134. package/dist/{tools-DXQmfFuE.mjs → tools-D_hfUU_Z.mjs} +1 -1
  135. package/dist/{turnstile-cfdaO4ca.mjs → turnstile-BRzXd28B.mjs} +4 -4
  136. package/dist/{ui-D4KtlMh9.mjs → ui-erjBdVKL.mjs} +1 -1
  137. package/dist/url-normalization-D-NxuLtN.mjs +3 -0
  138. package/dist/url-scanner-BzzR6iDx.mjs +2 -0
  139. package/dist/{user-CAo-yCJA.mjs → user-C4omq__w.mjs} +2 -2
  140. package/dist/vectorize-By6EqcNR.mjs +4 -0
  141. package/dist/{versions-CUwWJWmy.mjs → versions-CBHwWPAM.mjs} +1 -1
  142. package/dist/{waiting-rooms-Dln5ICg5.mjs → waiting-rooms-u6KwrzWd.mjs} +6 -6
  143. package/dist/{web3-HQJRm38W.mjs → web3-DQ5dmE9W.mjs} +3 -3
  144. package/dist/{workers-Dg7ddG2Q.mjs → workers-D8Be7_as.mjs} +14 -14
  145. package/dist/workers-builds-BE3W3qNk.mjs +7 -0
  146. package/dist/{workflows-VquuSh2J.mjs → workflows-BWWufqFA.mjs} +3 -3
  147. package/dist/zaraz-Bsa9AvVL.mjs +2 -0
  148. package/dist/{zero-trust-CP96wnSh.mjs → zero-trust-UNVZFnKu.mjs} +87 -87
  149. package/dist/zero_trust-B0_Rk4p2.mjs +3 -0
  150. package/dist/zones-BXtdwt6E.mjs +21 -0
  151. package/package.json +4 -4
  152. package/dist/ai-DOOKLPkG.mjs +0 -2
  153. package/dist/ai-gateway-Cj1T3avF.mjs +0 -8
  154. package/dist/ai-search-CQF_Sn7d.mjs +0 -7
  155. package/dist/ai_gateway-C3fH22C0.mjs +0 -4
  156. package/dist/analytics_engine-DdXVR8z2.mjs +0 -2
  157. package/dist/argo-CX_A4kcn.mjs +0 -2
  158. package/dist/audit-logs-BfBf3oo-.mjs +0 -2
  159. package/dist/auth-SyWhMmPu.mjs +0 -6
  160. package/dist/auth-ffdf9yR0.mjs +0 -135
  161. package/dist/autorag-BuGhGTeZ.mjs +0 -2
  162. package/dist/billing-PoG81XaQ.mjs +0 -2
  163. package/dist/bot-management-CFvtVx62.mjs +0 -5
  164. package/dist/botnet-feed-B-M4Yu0W.mjs +0 -3
  165. package/dist/brand-protection-D05Eg-_6.mjs +0 -3
  166. package/dist/browser-rendering-xu8F_Rrv.mjs +0 -4
  167. package/dist/calls-CZbO7TyR.mjs +0 -4
  168. package/dist/certificate-authorities-D2yr7_3t.mjs +0 -2
  169. package/dist/client-certificates-MJcDsTId.mjs +0 -3
  170. package/dist/cloud-connector-DWOrN2eM.mjs +0 -2
  171. package/dist/config-DYzlVxcB.mjs +0 -2
  172. package/dist/connectivity-BX8C7tvK.mjs +0 -3
  173. package/dist/content-scanning-r6uzMO1r.mjs +0 -4
  174. package/dist/context-DGlHRGWM.mjs +0 -2
  175. package/dist/custom-nameservers-D1DtlRue.mjs +0 -3
  176. package/dist/custom-pages-DQCi2plU.mjs +0 -4
  177. package/dist/d1-DbnYhw45.mjs +0 -4
  178. package/dist/data-security-D_EtYBfo.mjs +0 -6
  179. package/dist/dcv-delegation-CHspSzTI.mjs +0 -2
  180. package/dist/diagnostics-BJQGjVJn.mjs +0 -3
  181. package/dist/dist-DNBSHor6.mjs +0 -301
  182. package/dist/dns-firewall-B4DVXFBQ.mjs +0 -57
  183. package/dist/durable-objects-CTboySEo.mjs +0 -2
  184. package/dist/email-sending-DwWKc5jC.mjs +0 -3
  185. package/dist/google-tag-gateway-BGD49nRC.mjs +0 -2
  186. package/dist/hostnames-BiomxukN.mjs +0 -3
  187. package/dist/hyperdrive-Da104VaQ.mjs +0 -18
  188. package/dist/iam-BIGKo0WW.mjs +0 -6
  189. package/dist/images-BO8FbDAa.mjs +0 -5
  190. package/dist/intel-CY6_79v8.mjs +0 -3
  191. package/dist/keyless-certificates-CZC-L8gM.mjs +0 -3
  192. package/dist/leaked-credential-checks-qLzRyu85.mjs +0 -3
  193. package/dist/magic-cloud-networking-CSOM3EM-.mjs +0 -5
  194. package/dist/managed-transforms-D15yVbZx.mjs +0 -3
  195. package/dist/mtls-certificates-D8k0AXWK.mjs +0 -3
  196. package/dist/origin-ca-certificates-DXIvD8H5.mjs +0 -3
  197. package/dist/origin-post-quantum-encryption-C8oOczyV.mjs +0 -2
  198. package/dist/progress-CrCGTq7N.mjs +0 -2
  199. package/dist/queues-CN6DPhRR.mjs +0 -6
  200. package/dist/r2-data-catalog-Bbo93TJx.mjs +0 -14
  201. package/dist/radar-Bxb0WX8V.mjs +0 -2
  202. package/dist/raw-fetch-Dlccg0Tr.mjs +0 -2
  203. package/dist/request-tracers-DOW_reTJ.mjs +0 -2
  204. package/dist/resource-sharing-D7TX0JV0.mjs +0 -5
  205. package/dist/rules-BXRADHL5.mjs +0 -4
  206. package/dist/rum-BjPptTUP.mjs +0 -4
  207. package/dist/security-center-DAy6AKtT.mjs +0 -2
  208. package/dist/security-txt-xAMb7K6Y.mjs +0 -3
  209. package/dist/shared-AGtpXwwL.mjs +0 -2
  210. package/dist/snippets-CCSsCXVs.mjs +0 -4
  211. package/dist/speed-CuzTE0AL.mjs +0 -4
  212. package/dist/src-BW6vfAwE.mjs +0 -108
  213. package/dist/ssl-BWA2LdwC.mjs +0 -15
  214. package/dist/stream-GFsIZ-pP.mjs +0 -14
  215. package/dist/url-normalization-B5RN4nLD.mjs +0 -3
  216. package/dist/url-scanner-BrZ1L9OC.mjs +0 -2
  217. package/dist/vectorize-C7_oQlaI.mjs +0 -4
  218. package/dist/workers-builds-AVfx8IyL.mjs +0 -7
  219. package/dist/zaraz-xYSWIV4P.mjs +0 -2
  220. package/dist/zones-BSgmZ9WC.mjs +0 -21
  221. /package/dist/{body-parser-DKa8Ipg1.mjs → body-parser-DWSy7uZ8.mjs} +0 -0
  222. /package/dist/{cli-types-CRIDdDw3.mjs → cli-types-BeyOc81z.mjs} +0 -0
  223. /package/dist/{input-validation-zEO81MWN.mjs → input-validation-_fMCApaH.mjs} +0 -0
  224. /package/dist/{lib-Eu1wXxuh.mjs → lib-4PQI6yRW.mjs} +0 -0
  225. /package/dist/{local-VJaJ3BZ1.mjs → local-CYc9q7l2.mjs} +0 -0
  226. /package/dist/{metadata-5VwHPW6C.mjs → metadata-OOwvpR8m.mjs} +0 -0
  227. /package/dist/{resolve-4-OSeHlK.mjs → resolve-C3h-mwp7.mjs} +0 -0
  228. /package/dist/{theme-BklJDrb2.mjs → theme-DbNbIY4d.mjs} +0 -0
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{D as e,E as t,S as n,T as r,n as i}from"./auth-ffdf9yR0.mjs";import{n as a,t as o}from"./body-parser-DKa8Ipg1.mjs";import{t as s}from"./output-BJFNwj7b.mjs";import{n as c,t as l}from"./progress-CrCGTq7N.mjs";import{n as u}from"./input-validation-zEO81MWN.mjs";function d(e){return e.option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).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 f={command:`create`,describe:`Create Web3 Hostname`,builder:d,handler:async r=>{if(r.dryRun){c({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${r.zone??r.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(r.zone??r[`zone-id`]??``)},bodyKind:`json`,body:r.body===void 0?o({description:u(r.description,`description`,`text`),dnslink:u(r.dnslink,`dnslink`,`text`),name:u(r.name,`name`,`text`),target:u(r.target,`target`,`text`)}):a(r.body)});return}let d=await i(r),f=await n({zone:r.zone},d,{quiet:r.quiet});if(r.zoneId=f,r.body){let e=a(r.body);s(await l(`Creating`,async()=>d.web3.hostnames.create({...e,zone_id:f})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await e(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),r.target===void 0&&(r.target=await t(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let p=o({description:u(r.description,`description`,`text`),dnslink:u(r.dnslink,`dnslink`,`text`),name:u(r.name,`name`,`text`),target:u(r.target,`target`,`text`)});s(await l(`Creating`,async()=>d.web3.hostnames.create({...p,zone_id:f})),{successLabel:`Created`})}};function p(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,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 m={command:`delete <identifier>`,describe:`Delete Web3 Hostname`,builder:p,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),a=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=a,!await r({force:!!e.force})){process.stderr.write(`Aborted.
3
- `);return}s(await l(`Deleting`,async()=>t.web3.hostnames.delete({zone_id:a,identifier:e.identifier})),{successLabel:`Deleted`})}};function h(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:h,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}):a(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.web3.hostnames.edit({...n,zone_id:r,identifier:e.identifier})),{successLabel:`Updated`});return}let d=o({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)});s(await l(`Updating`,async()=>t.web3.hostnames.edit({...d,zone_id:r,identifier:e.identifier})),{successLabel:`Updated`})}};function _(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <identifier>`,describe:`Web3 Hostname Details`,builder:_,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,s(await l(`Loading`,async()=>t.web3.hostnames.get({zone_id:r,identifier:e.identifier})),{successLabel:`Loaded`})}};function y(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:y,handler:async r=>{if(r.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${r.zone??r.zoneId??`<zone>`}/web3/hostnames/${r.identifier==null?`<identifier>`:encodeURIComponent(String(r.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(r.identifier??``),"zone-id":String(r.zone??r[`zone-id`]??``)},bodyKind:`json`,body:r.body===void 0?o({content:u(r.content,`content`,`text`),description:u(r.description,`description`,`text`),type:u(r.type,`type`,`text`)}):a(r.body)});return}let d=await i(r),f=await n({zone:r.zone},d,{quiet:r.quiet});if(r.zoneId=f,r.body){let e=a(r.body);s(await l(`Creating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create({body:e,zone_id:f,identifier:r.identifier})),{successLabel:`Created`});return}r.content===void 0&&(r.content=await e(`content`,`Specify the CID or content path of content to block.`)),r.type===void 0&&(r.type=await t(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=o({content:u(r.content,`content`,`text`),description:u(r.description,`description`,`text`),type:u(r.type,`type`,`text`)});s(await l(`Creating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create({body:p,zone_id:f,identifier:r.identifier})),{successLabel:`Created`})}};function x(e){return e.positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,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 <content-list-entry-identifier>`,describe:`Delete IPFS Universal Path Gateway Content List Entry`,builder:x,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``),identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),a=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=a,!await r({force:!!e.force})){process.stderr.write(`Aborted.
4
- `);return}s(await l(`Deleting`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.entries.delete({zone_id:a,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]})),{successLabel:`Deleted`})}};function C(e){return e.positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <content-list-entry-identifier>`,describe:`IPFS Universal Path Gateway Content List Entry Details`,builder:C,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``),identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,s(await l(`Loading`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.entries.get({zone_id:r,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]})),{successLabel:`Loaded`})}};function T(e){return e.option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List IPFS Universal Path Gateway Content List Entries`,builder:T,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,s(await l(`Loading`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.entries.list({zone_id:r,identifier:e.identifier})),{successLabel:`Loaded`})}};function D(e){return e.positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:D,handler:async r=>{if(r.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${r.zone??r.zoneId??`<zone>`}/web3/hostnames/${r.identifier==null?`<identifier>`:encodeURIComponent(String(r.identifier))}/ipfs_universal_path/content_list/entries/${r[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(r[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(r[`content-list-entry-identifier`]??``),identifier:String(r.identifier??``),"zone-id":String(r.zone??r[`zone-id`]??``)},bodyKind:`json`,body:r.body===void 0?o({content:u(r.content,`content`,`text`),description:u(r.description,`description`,`text`),type:u(r.type,`type`,`text`)}):a(r.body)});return}let d=await i(r),f=await n({zone:r.zone},d,{quiet:r.quiet});if(r.zoneId=f,r.body){let e=a(r.body);s(await l(`Updating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update({body:e,zone_id:f,identifier:r.identifier,content_list_entry_identifier:r[`content-list-entry-identifier`]})),{successLabel:`Updated`});return}r.content===void 0&&(r.content=await e(`content`,`Specify the CID or content path of content to block.`)),r.type===void 0&&(r.type=await t(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=o({content:u(r.content,`content`,`text`),description:u(r.description,`description`,`text`),type:u(r.type,`type`,`text`)});s(await l(`Updating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update({body:p,zone_id:f,identifier:r.identifier,content_list_entry_identifier:r[`content-list-entry-identifier`]})),{successLabel:`Updated`})}},k={command:`entries`,describe:`Web3 gateway hostnames with IPFS Universal Path content list management`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <identifier>`,describe:`IPFS Universal Path Gateway Content List Details`,builder:A,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,s(await l(`Loading`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.get({zone_id:r,identifier:e.identifier})),{successLabel:`Loaded`})}};function M(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`action`,{type:`string`,description:`Behavior of the content list.`,choices:[`block`]}).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 <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:M,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({action:u(e.action,`action`,`text`)}):a(e.body)});return}let r=await i(e),d=await n({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=a(e.body);s(await l(`Updating`,async()=>r.web3.hostnames.ipfsUniversalPaths.contentLists.update({...t,zone_id:d,identifier:e.identifier})),{successLabel:`Updated`});return}e.action===void 0&&(e.action=await t(`action`,`Behavior of the content list.`,[`block`]));let f=o({action:u(e.action,`action`,`text`)});s(await l(`Updating`,async()=>r.web3.hostnames.ipfsUniversalPaths.contentLists.update({...f,zone_id:d,identifier:e.identifier})),{successLabel:`Updated`})}},P={command:`content-lists`,describe:`Web3 gateway hostnames with IPFS Universal Path content list management`,builder:e=>e.command(j).command(N).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`ipfs-universal-paths`,describe:`Operations for hostnames.ipfs-universal-paths`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List Web3 Hostnames`,builder:I,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,s(await l(`Loading`,async()=>t.web3.hostnames.list({zone_id:r})),{successLabel:`Loaded`})}},R={command:`hostnames`,describe:`Web3 gateway hostnames with IPFS Universal Path content list management`,builder:e=>e.command(f).command(m).command(g).command(v).command(L).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`web3`,describe:`Web3 gateways — serve IPFS and Ethereum content through custom hostnames on Cloudflare`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{z as default};
2
+ import{E as e,T as t,w as n,x as r}from"./oauth-Bk-F-tIO.mjs";import{n as i}from"./auth-CSC4yhEJ.mjs";import{n as a,t as o}from"./body-parser-DWSy7uZ8.mjs";import{t as s}from"./output-B6fBFRqe.mjs";import{n as c,t as l}from"./progress-DrDErV9w.mjs";import{n as u}from"./input-validation-_fMCApaH.mjs";function d(e){return e.option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).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 f={command:`create`,describe:`Create Web3 Hostname`,builder:d,handler:async n=>{if(n.dryRun){c({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(n.zone??n[`zone-id`]??``)},bodyKind:`json`,body:n.body===void 0?o({description:u(n.description,`description`,`text`),dnslink:u(n.dnslink,`dnslink`,`text`),name:u(n.name,`name`,`text`),target:u(n.target,`target`,`text`)}):a(n.body)});return}let d=await i(n),f=await r({zone:n.zone},d,{quiet:n.quiet});if(n.zoneId=f,n.body){let e=a(n.body);s(await l(`Creating`,async()=>d.web3.hostnames.create({...e,zone_id:f})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await e(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),n.target===void 0&&(n.target=await t(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let p=o({description:u(n.description,`description`,`text`),dnslink:u(n.dnslink,`dnslink`,`text`),name:u(n.name,`name`,`text`),target:u(n.target,`target`,`text`)});s(await l(`Creating`,async()=>d.web3.hostnames.create({...p,zone_id:f})),{successLabel:`Created`})}};function p(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,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 m={command:`delete <identifier>`,describe:`Delete Web3 Hostname`,builder:p,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),a=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=a,!await n({force:!!e.force})){process.stderr.write(`Aborted.
3
+ `);return}s(await l(`Deleting`,async()=>t.web3.hostnames.delete({zone_id:a,identifier:e.identifier})),{successLabel:`Deleted`})}};function h(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:h,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}):a(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=a(e.body);s(await l(`Updating`,async()=>t.web3.hostnames.edit({...r,zone_id:n,identifier:e.identifier})),{successLabel:`Updated`});return}let d=o({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)});s(await l(`Updating`,async()=>t.web3.hostnames.edit({...d,zone_id:n,identifier:e.identifier})),{successLabel:`Updated`})}};function _(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <identifier>`,describe:`Web3 Hostname Details`,builder:_,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,s(await l(`Loading`,async()=>t.web3.hostnames.get({zone_id:n,identifier:e.identifier})),{successLabel:`Loaded`})}};function y(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:y,handler:async n=>{if(n.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/web3/hostnames/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(n.identifier??``),"zone-id":String(n.zone??n[`zone-id`]??``)},bodyKind:`json`,body:n.body===void 0?o({content:u(n.content,`content`,`text`),description:u(n.description,`description`,`text`),type:u(n.type,`type`,`text`)}):a(n.body)});return}let d=await i(n),f=await r({zone:n.zone},d,{quiet:n.quiet});if(n.zoneId=f,n.body){let e=a(n.body);s(await l(`Creating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create({body:e,zone_id:f,identifier:n.identifier})),{successLabel:`Created`});return}n.content===void 0&&(n.content=await e(`content`,`Specify the CID or content path of content to block.`)),n.type===void 0&&(n.type=await t(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=o({content:u(n.content,`content`,`text`),description:u(n.description,`description`,`text`),type:u(n.type,`type`,`text`)});s(await l(`Creating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create({body:p,zone_id:f,identifier:n.identifier})),{successLabel:`Created`})}};function x(e){return e.positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,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 <content-list-entry-identifier>`,describe:`Delete IPFS Universal Path Gateway Content List Entry`,builder:x,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``),identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),a=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=a,!await n({force:!!e.force})){process.stderr.write(`Aborted.
4
+ `);return}s(await l(`Deleting`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.entries.delete({zone_id:a,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]})),{successLabel:`Deleted`})}};function C(e){return e.positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <content-list-entry-identifier>`,describe:`IPFS Universal Path Gateway Content List Entry Details`,builder:C,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``),identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,s(await l(`Loading`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.entries.get({zone_id:n,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]})),{successLabel:`Loaded`})}};function T(e){return e.option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List IPFS Universal Path Gateway Content List Entries`,builder:T,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,s(await l(`Loading`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.entries.list({zone_id:n,identifier:e.identifier})),{successLabel:`Loaded`})}};function D(e){return e.positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:D,handler:async n=>{if(n.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/web3/hostnames/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/ipfs_universal_path/content_list/entries/${n[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(n[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(n[`content-list-entry-identifier`]??``),identifier:String(n.identifier??``),"zone-id":String(n.zone??n[`zone-id`]??``)},bodyKind:`json`,body:n.body===void 0?o({content:u(n.content,`content`,`text`),description:u(n.description,`description`,`text`),type:u(n.type,`type`,`text`)}):a(n.body)});return}let d=await i(n),f=await r({zone:n.zone},d,{quiet:n.quiet});if(n.zoneId=f,n.body){let e=a(n.body);s(await l(`Updating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update({body:e,zone_id:f,identifier:n.identifier,content_list_entry_identifier:n[`content-list-entry-identifier`]})),{successLabel:`Updated`});return}n.content===void 0&&(n.content=await e(`content`,`Specify the CID or content path of content to block.`)),n.type===void 0&&(n.type=await t(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=o({content:u(n.content,`content`,`text`),description:u(n.description,`description`,`text`),type:u(n.type,`type`,`text`)});s(await l(`Updating`,async()=>d.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update({body:p,zone_id:f,identifier:n.identifier,content_list_entry_identifier:n[`content-list-entry-identifier`]})),{successLabel:`Updated`})}},k={command:`entries`,describe:`Web3 gateway hostnames with IPFS Universal Path content list management`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <identifier>`,describe:`IPFS Universal Path Gateway Content List Details`,builder:A,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,s(await l(`Loading`,async()=>t.web3.hostnames.ipfsUniversalPaths.contentLists.get({zone_id:n,identifier:e.identifier})),{successLabel:`Loaded`})}};function M(e){return e.positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`action`,{type:`string`,description:`Behavior of the content list.`,choices:[`block`]}).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 <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:M,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(e.identifier??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?o({action:u(e.action,`action`,`text`)}):a(e.body)});return}let n=await i(e),d=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=a(e.body);s(await l(`Updating`,async()=>n.web3.hostnames.ipfsUniversalPaths.contentLists.update({...t,zone_id:d,identifier:e.identifier})),{successLabel:`Updated`});return}e.action===void 0&&(e.action=await t(`action`,`Behavior of the content list.`,[`block`]));let f=o({action:u(e.action,`action`,`text`)});s(await l(`Updating`,async()=>n.web3.hostnames.ipfsUniversalPaths.contentLists.update({...f,zone_id:d,identifier:e.identifier})),{successLabel:`Updated`})}},P={command:`content-lists`,describe:`Web3 gateway hostnames with IPFS Universal Path content list management`,builder:e=>e.command(j).command(N).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`ipfs-universal-paths`,describe:`Operations for hostnames.ipfs-universal-paths`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List Web3 Hostnames`,builder:I,handler:async e=>{if(e.dryRun){c({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,s(await l(`Loading`,async()=>t.web3.hostnames.list({zone_id:n})),{successLabel:`Loaded`})}},R={command:`hostnames`,describe:`Web3 gateway hostnames with IPFS Universal Path content list management`,builder:e=>e.command(f).command(m).command(g).command(v).command(L).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`web3`,describe:`Web3 gateways — serve IPFS and Ethereum content through custom hostnames on Cloudflare`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{z as default};