cf 1.0.0-beta.27 → 1.0.0-beta.28
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.
- package/dist/_meta/commands.json +5787 -1914
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +796 -557
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
- package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
- package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
- package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
- package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/containers-B06OGOEB.mjs +380 -0
- package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
- package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
- package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
- package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
- package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
- package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
- package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
- package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
- package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
- package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
- package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
- package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/k2-CZT2Pd5J.mjs +10 -0
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
- package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
- package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
- package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
- package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
- package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
- package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
- package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
- package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
- package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
- package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
- package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
- package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
- package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
- package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +14 -14
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/containers-DINLx5_i.mjs +0 -380
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/workers-B3uJqJKc.mjs +0 -39
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,o as f,r as p,s as m,t as h}from"./body-parser-BKcZS9iJ.mjs";import{n as g}from"./input-validation-D7z60HJH.mjs";import{n as _}from"./prompt-D0dXwuME.mjs";import{n as v,t as y}from"./raw-fetch-DQeDx1wT.mjs";var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl`,query:[`cacheTTL`],body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ee(e){return e.usage("$0 browser-run crawl create\n\nStarts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).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 x={command:`create`,describe:`Crawl websites.`,builder:ee,handler:async e=>l({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={cacheTTL:e[`cache-ttl`]};if(e.dryRun){let t=await i();s({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:l,bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await c(`Creating`,async()=>u.send(b,{body:t,account_id:f,...l}));o(n,{successLabel:`Created`});return}let p=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:l}));o(p,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl/${t.job_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ne(e){return e.usage(`$0 browser-run crawl delete <job-id>
|
|
3
|
-
|
|
4
|
-
Cancels an ongoing crawl job by setting its status to cancelled and stopping all queued URLs.`).positional(`job-id`,{type:`string`,description:`The ID of the crawl job to cancel.`,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 re={command:`delete <job-id>`,describe:`Cancel a crawl job.`,builder:ne,handler:async e=>l({command:`browser-run crawl delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run crawl delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/crawl/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(te,{account_id:l,job_id:e[`job-id`]}));o(u,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/crawl/${t.job_id}`,query:[`cacheTTL`,`status`,`cursor`,`limit`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 browser-run crawl get <job-id>
|
|
5
|
-
|
|
6
|
-
Returns the result of a crawl job.`).positional(`job-id`,{type:`string`,description:`Crawl job ID.`,demandOption:!0}).option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`status`,{type:`string`,description:`Filter by URL status.`,choices:[`queued`,`errored`,`completed`,`disallowed`,`skipped`,`cancelled`]}).option(`cursor`,{type:`number`,description:`Cursor for pagination.`}).option(`limit`,{type:`number`,description:`Limit for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <job-id>`,describe:`Get crawl result.`,builder:ae,handler:async e=>l({command:`browser-run crawl get`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],status:e.status,cursor:e.cursor,limit:e.limit};if(e.dryRun){let t=await i();s({command:`cf browser-run crawl get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/crawl/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ie,{account_id:u,job_id:e[`job-id`],...n}));o(d,{successLabel:`Loaded`})})},se={command:`crawl`,describe:`Operations for crawl`,builder:e=>e.command(x).command(re).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser`,query:[`keep_alive`,`lab`,`targets`,`liveViewUrlExpiresInMs`,`recording`],body:`json`,errors:{429:`TooManyRequestsError`}};function ce(e){return e.usage(`$0 browser-run devtools browser create
|
|
7
|
-
|
|
8
|
-
Acquires a browser and returns its session ID and websocket URL. Optionally accepts a JSON body with session guardrails to restrict outbound HTTP/S traffic.`).option(`keep-alive`,{type:`number`,description:`Keep-alive time in milliseconds.`}).option(`lab`,{type:`boolean`,description:`Use experimental browser.`}).option(`targets`,{type:`boolean`,description:`Include browser targets in response.`}).option(`live-view-url-expires-in-ms`,{type:`number`,description:`How long the live view URL remains valid, in milliseconds (max 60 minutes). Only used when targets is true.`}).option(`recording`,{type:`boolean`,description:`Recording`}).option(`guardrails-allowed-domain-sets`,{type:`string`,array:!0,description:`Max 4 entries: curated preset names (common-cdns) and/or https URLs of newline-separated hostname lists.`}).option(`guardrails-allowed-domains`,{type:`string`,array:!0,description:`Hostname patterns, max 50. Supports exact hosts (example.com) or a single * wildcard anywhere. Prefer *.example.com (subdomain wildcard) over *example.com (prefix wildcard) to avoid matching overbroad lookalikes like evilexample.com.`}).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:`create`,describe:`Get a browser session ID.`,builder:ce,handler:async e=>l({command:`browser-run devtools browser create`,classification:{safeFlags:[`lab`,`targets`,`recording`,`dry-run`]}},e,async()=>{let n={keep_alive:e[`keep-alive`],lab:e.lab,targets:e.targets,liveViewUrlExpiresInMs:e[`live-view-url-expires-in-ms`],recording:e.recording};if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({guardrails:{allowedDomainSets:e[`guardrails-allowed-domain-sets`],allowedDomains:e[`guardrails-allowed-domains`]}}):d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(S,{body:t,account_id:u,...n}));o(r,{successLabel:`Created`});return}let f=h({guardrails:{allowedDomainSets:e[`guardrails-allowed-domain-sets`],allowedDomains:e[`guardrails-allowed-domains`]}});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>l.send(S,{body:f,account_id:u,...n}));o(p,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}`,errors:{404:`NotFoundError`}};function T(e){return e.usage(`$0 browser-run devtools browser delete <session-id>
|
|
9
|
-
|
|
10
|
-
Closes an existing browser session.`).positional(`session-id`,{type:`string`,description:`Browser session ID to close.`,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 E={command:`delete <session-id>`,describe:`Close browser session.`,builder:T,handler:async e=>l({command:`browser-run devtools browser delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}`,pathParams:{"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(w,{account_id:l,session_id:e[`session-id`]}));o(u,{successLabel:`Deleted`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/live_view`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 browser-run devtools browser live-view create <session-id>
|
|
11
|
-
|
|
12
|
-
Generates time-limited URLs to view a remote browser session. Set \`guardrails: { mode: 'readonly' }\` to create a view-only link.`).positional(`session-id`,{type:`string`,description:`Browser session ID`,demandOption:!0}).option(`expires-in-ms`,{type:`number`,description:`How long the live view URLs remain valid, in milliseconds. Default: 5 minutes. Max: 60 minutes.`,default:3e5}).option(`guardrails-mode`,{type:`string`,description:`The guardrails.mode field`,choices:[`readonly`]}).coerce(`guardrails-mode`,e=>g(e,`guardrails-mode`,`text`)).option(`view-mode`,{type:`string`,description:`UI mode: 'devtools' (Chrome DevTools), 'tab' (single tab view), 'full' (multi-tab browser)`,choices:[`devtools`,`tab`,`full`],default:`devtools`}).coerce(`view-mode`,e=>g(e,`view-mode`,`text`)).option(`target-id`,{type:`string`,description:`Target ID (page) to connect to. If omitted, auto-resolves to the first active page.`}).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 k={command:`create <session-id>`,describe:`Mint live view URLs for a browser session`,builder:O,handler:async e=>l({command:`browser-run devtools browser live-view create`,classification:{safeFlags:[`guardrails-mode`,`view-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser live-view create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/live_view`,pathParams:{"session-id":String(e[`session-id`]??``)},bodyKind:`json`,body:e.body===void 0?h({expiresInMs:e[`expires-in-ms`],guardrails:{mode:e[`guardrails-mode`]},mode:e[`view-mode`],targetId:g(e[`target-id`],`target-id`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(D,{body:t,account_id:l,session_id:e[`session-id`]}));o(r,{successLabel:`Created`});return}let u=h({expiresInMs:e[`expires-in-ms`],guardrails:{mode:e[`guardrails-mode`]},mode:e[`view-mode`],targetId:g(e[`target-id`],`target-id`,`text`)}),f=await c(`Creating`,async()=>n.send(D,{body:u,account_id:l,session_id:e[`session-id`]}));o(f,{successLabel:`Created`})})},A={command:`live-view`,describe:`Operations for devtools.browser.live-view`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/protocol`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function M(e){return e.usage(`$0 browser-run devtools browser protocol <session-id>
|
|
13
|
-
|
|
14
|
-
Returns the complete Chrome DevTools Protocol schema including all domains, commands, events, and types. This schema describes the entire CDP API surface.`).positional(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`protocol <session-id>`,describe:`Get Chrome DevTools Protocol schema.`,builder:M,handler:async e=>l({command:`browser-run devtools browser protocol`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser protocol`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/protocol`,pathParams:{"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(j,{account_id:l,session_id:e[`session-id`]}));o(u,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/activate/${t.target_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function F(e){return e.usage(`$0 browser-run devtools browser targets activate <target-id>
|
|
15
|
-
|
|
16
|
-
Activates (brings to front) a specific browser target by its ID.`).positional(`target-id`,{type:`string`,description:`Target ID to activate.`,demandOption:!0}).option(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`activate <target-id>`,describe:`Activate a browser target.`,builder:F,handler:async e=>l({command:`browser-run devtools browser targets activate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser targets activate`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/activate/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"session-id":String(e[`session-id`]??``),"target-id":String(e[`target-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(P,{account_id:l,session_id:e[`session-id`],target_id:e[`target-id`]}));o(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/close/${t.target_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function R(e){return e.usage(`$0 browser-run devtools browser targets close <target-id>
|
|
17
|
-
|
|
18
|
-
Closes a specific browser target (tab, page, etc.) by its ID. Returns 'Target is closing' on success or an error if the target is not found.`).positional(`target-id`,{type:`string`,description:`Target ID to close.`,demandOption:!0}).option(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`close <target-id>`,describe:`Close a browser target.`,builder:R,handler:async e=>l({command:`browser-run devtools browser targets close`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser targets close`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/close/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"session-id":String(e[`session-id`]??``),"target-id":String(e[`target-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(L,{account_id:l,session_id:e[`session-id`],target_id:e[`target-id`]}));o(u,{successLabel:`Loaded`})})};var B={method:`PUT`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/new`,query:[`url`,`liveViewUrlExpiresInMs`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 browser-run devtools browser targets create <session-id>
|
|
19
|
-
|
|
20
|
-
Opens a new tab in the browser. Optionally specify a URL to navigate to.`).positional(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`url`,{type:`string`,description:`Url`}).option(`live-view-url-expires-in-ms`,{type:`number`,description:`How long the live view URL remains valid, in milliseconds (max 60 minutes)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`create <session-id>`,describe:`Open a new browser tab.`,builder:V,handler:async e=>l({command:`browser-run devtools browser targets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={url:e.url,liveViewUrlExpiresInMs:e[`live-view-url-expires-in-ms`]};if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser targets create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/new`,pathParams:{"session-id":String(e[`session-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Updating`,async()=>l.send(B,{account_id:u,session_id:e[`session-id`],...n}));o(d,{successLabel:`Updated`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/list/${t.target_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function W(e){return e.usage(`$0 browser-run devtools browser targets get <target-id>
|
|
21
|
-
|
|
22
|
-
Returns the debuggable target with the given ID.`).positional(`target-id`,{type:`string`,description:`Target ID.`,demandOption:!0}).option(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <target-id>`,describe:`Get a target by ID.`,builder:W,handler:async e=>l({command:`browser-run devtools browser targets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser targets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/list/${e[`target-id`]==null?`<target-id>`:encodeURIComponent(String(e[`target-id`]))}`,pathParams:{"session-id":String(e[`session-id`]??``),"target-id":String(e[`target-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(U,{account_id:l,session_id:e[`session-id`],target_id:e[`target-id`]}));o(u,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/list`,query:[`liveViewUrlExpiresInMs`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function ue(e){return e.usage(`$0 browser-run devtools browser targets list
|
|
23
|
-
|
|
24
|
-
Returns a list of all debuggable targets including tabs, pages, service workers, and other browser contexts.`).option(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`live-view-url-expires-in-ms`,{type:`number`,description:`How long the live view URLs remain valid, in milliseconds (max 60 minutes)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List targets.`,builder:ue,handler:async e=>l({command:`browser-run devtools browser targets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={liveViewUrlExpiresInMs:e[`live-view-url-expires-in-ms`]};if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser targets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/list`,pathParams:{"session-id":String(e[`session-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(le,{account_id:u,session_id:e[`session-id`],...n}));o(d,{successLabel:`Loaded`})})},fe={command:`targets`,describe:`Operations for devtools.browser.targets`,builder:e=>e.command(I).command(z).command(H).command(G).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json/version`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function me(e){return e.usage(`$0 browser-run devtools browser version <session-id>
|
|
25
|
-
|
|
26
|
-
Get browser version metadata.`).positional(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`version <session-id>`,describe:`Get browser version metadata.`,builder:me,handler:async e=>l({command:`browser-run devtools browser version`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools browser version`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json/version`,pathParams:{"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(pe,{account_id:l,session_id:e[`session-id`]}));o(u,{successLabel:`Loaded`})})},ge={command:`browser`,describe:`Operations for devtools.browser`,builder:e=>e.command(C).command(E).command(N).command(he).command(A).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _e={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/browser/${t.session_id}/json`,query:[`liveViewUrlExpiresInMs`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function ve(e){return e.usage(`$0 browser-run devtools json get <session-id>
|
|
27
|
-
|
|
28
|
-
Returns a list of all debuggable targets including tabs, pages, service workers, and other browser contexts.`).positional(`session-id`,{type:`string`,description:`Browser session ID.`,demandOption:!0}).option(`live-view-url-expires-in-ms`,{type:`number`,description:`How long the live view URLs remain valid, in milliseconds (max 60 minutes)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get <session-id>`,describe:`List targets.`,builder:ve,handler:async e=>l({command:`browser-run devtools json get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={liveViewUrlExpiresInMs:e[`live-view-url-expires-in-ms`]};if(e.dryRun){let t=await i();s({command:`cf browser-run devtools json get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/browser/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/json`,pathParams:{"session-id":String(e[`session-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(_e,{account_id:u,session_id:e[`session-id`],...n}));o(d,{successLabel:`Loaded`})})},be={command:`json`,describe:`Operations for devtools.json`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/session/${t.session_id}`,errors:{404:`NotFoundError`}};function Se(e){return e.usage(`$0 browser-run devtools session get <session-id>
|
|
29
|
-
|
|
30
|
-
Get details for a specific browser session.`).positional(`session-id`,{type:`string`,description:`Session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get <session-id>`,describe:`Get session details.`,builder:Se,handler:async e=>l({command:`browser-run devtools session get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run devtools session get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/devtools/session/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}`,pathParams:{"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(xe,{account_id:l,session_id:e[`session-id`]}));o(u,{successLabel:`Loaded`})})};var we={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/devtools/session`,query:[`limit`,`offset`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function Te(e){return e.usage(`$0 browser-run devtools session list
|
|
31
|
-
|
|
32
|
-
List active browser sessions.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`list`,describe:`List sessions.`,builder:Te,handler:async e=>l({command:`browser-run devtools session list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset};if(e.dryRun){let e=await i();s({command:`cf browser-run devtools session list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/browser-rendering/devtools/session`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(we,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},De={command:`session`,describe:`Operations for devtools.session`,builder:e=>e.command(Ce).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oe={command:`devtools`,describe:`Operations for devtools`,builder:e=>e.command(ge).command(be).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/accessibilityTree`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ke(e){return e.usage("$0 browser-run quick-action accessibility-tree\n\nReturns the page's accessibility tree. Use `interestingOnly` to only return semantically meaningful nodes; use `root` to scope the tree to a CSS-selector-anchored subtree. Control page loading with `gotoOptions` and `waitFor*` options.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`interesting-only`,{type:`boolean`,description:`The interestingOnly field`}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`root`,{type:`string`,description:`The root field`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Ae={command:`accessibility-tree`,describe:`Get accessibility tree page`,builder:ke,handler:async e=>l({command:`browser-run quick-action accessibility-tree`,classification:{safeFlags:[`browser`,`best-attempt`,`interesting-only`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action accessibility-tree`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/accessibilityTree`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),interestingOnly:e[`interesting-only`],rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],root:g(e.root,`root`,`text`),setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(K,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),interestingOnly:e[`interesting-only`],rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],root:g(e.root,`root`,`text`),setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send(K,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/content`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function je(e){return e.usage("$0 browser-run quick-action content\n\nFetches rendered HTML content from provided URL or HTML. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Me={command:`content`,describe:`Get HTML content.`,builder:je,handler:async e=>l({command:`browser-run quick-action content`,classification:{safeFlags:[`browser`,`best-attempt`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action content`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/content`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(q,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send(q,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/json`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Ne(e){return e.usage("$0 browser-run quick-action json\n\nGets json from a webpage from a provided URL or HTML. Pass `prompt` or `schema` in the body. Control page loading with `gotoOptions` and `waitFor*` options.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`custom-ai`,{type:`string`,description:`Optional list of custom AI models to use for the request. The models will be tried in the order provided, and in case a model returns an error, the next one will be used as fallback. Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`prompt`,{type:`string`,description:`The prompt field`}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`response-format-json-schema`,{type:`string`,description:`Schema for the response format. More information here: https://developers.cloudflare.com/workers-ai/json-mode/. Provide as a JSON object or @path/to/file.json.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`response-format-json-schema`,`response-format-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`response-format-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 --response-format-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Pe={command:`json`,describe:`Get json.`,builder:Ne,handler:async e=>l({command:`browser-run quick-action json`,classification:{safeFlags:[`browser`,`best-attempt`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action json`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/json`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),custom_ai:u(e[`custom-ai`],`custom-ai`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),prompt:g(e.prompt,`prompt`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],response_format:{json_schema:p(e[`response-format-json-schema`],`response-format-json-schema`),type:g(e[`response-format-type`],`response-format-type`,`text`)},setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`response_format`,`json_schema`],[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(J,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),custom_ai:u(e[`custom-ai`],`custom-ai`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),prompt:g(e.prompt,`prompt`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],response_format:{json_schema:p(e[`response-format-json-schema`],`response-format-json-schema`),type:g(e[`response-format-type`],`response-format-type`,`text`)},setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`response_format`,`json_schema`],[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send(J,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/links`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Fe(e){return e.usage(`$0 browser-run quick-action links
|
|
33
|
-
|
|
34
|
-
Get links from a web page.`).option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`exclude-external-links`,{type:`boolean`,description:`The excludeExternalLinks field`,default:!1}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`visible-links-only`,{type:`boolean`,description:`The visibleLinksOnly field`,default:!1}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Ie={command:`links`,describe:`Get Links.`,builder:Fe,handler:async e=>l({command:`browser-run quick-action links`,classification:{safeFlags:[`browser`,`best-attempt`,`exclude-external-links`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`visible-links-only`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action links`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/links`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),excludeExternalLinks:e[`exclude-external-links`],gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},visibleLinksOnly:e[`visible-links-only`],waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(Y,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),excludeExternalLinks:e[`exclude-external-links`],gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},visibleLinksOnly:e[`visible-links-only`],waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send(Y,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/markdown`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Le(e){return e.usage("$0 browser-run quick-action markdown\n\nGets markdown of a webpage from provided URL or HTML. Control page loading with `gotoOptions` and `waitFor*` options.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Re={command:`markdown`,describe:`Get markdown.`,builder:Le,handler:async e=>l({command:`browser-run quick-action markdown`,classification:{safeFlags:[`browser`,`best-attempt`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action markdown`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/markdown`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(X,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send(X,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})};function ze(e){return e.usage("$0 browser-run quick-action pdf\n\nFetches rendered PDF from provided URL or HTML. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`pdf-options-display-header-footer`,{type:`boolean`,description:`Whether to show the header and footer.`}).option(`pdf-options-footer-template`,{type:`string`,description:`HTML template for the print footer.`}).option(`pdf-options-format`,{type:`string`,description:`Paper format. Takes priority over width and height if set.`,choices:[`letter`,`legal`,`tabloid`,`ledger`,`a0`,`a1`,`a2`,`a3`,`a4`,`a5`,`a6`]}).coerce(`pdf-options-format`,e=>g(e,`pdf-options-format`,`text`)).option(`pdf-options-header-template`,{type:`string`,description:`HTML template for the print header.`}).option(`pdf-options-height`,{type:`string`,description:`Sets the height of paper. Can be a number or string with unit. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`pdf-options-landscape`,{type:`boolean`,description:`Whether to print in landscape orientation.`}).option(`pdf-options-margin-bottom`,{type:`string`,description:`The pdfOptions.margin.bottom field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`pdf-options-margin-left`,{type:`string`,description:`The pdfOptions.margin.left field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`pdf-options-margin-right`,{type:`string`,description:`The pdfOptions.margin.right field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`pdf-options-margin-top`,{type:`string`,description:`The pdfOptions.margin.top field. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`pdf-options-omit-background`,{type:`boolean`,description:`Hides default white background and allows generating pdfs with transparency.`}).option(`pdf-options-outline`,{type:`boolean`,description:`Generate document outline.`}).option(`pdf-options-page-ranges`,{type:`string`,description:`Paper ranges to print, e.g. '1-5, 8, 11-13'.`}).option(`pdf-options-prefer-csspage-size`,{type:`boolean`,description:`Give CSS @page size priority over other size declarations.`}).option(`pdf-options-print-background`,{type:`boolean`,description:`Set to true to print background graphics.`}).option(`pdf-options-scale`,{type:`number`,description:`Scales the rendering of the web page. Amount must be between 0.1 and 2.`}).option(`pdf-options-tagged`,{type:`boolean`,description:`Generate tagged (accessible) PDF.`}).option(`pdf-options-timeout`,{type:`number`,description:`Timeout in milliseconds.`}).option(`pdf-options-width`,{type:`string`,description:`Sets the width of paper. Can be a number or string with unit. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1}).check(e=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Be={command:`pdf`,describe:`Get PDF.`,builder:ze,handler:async e=>l({command:`browser-run quick-action pdf`,classification:{safeFlags:[`browser`,`best-attempt`,`pdf-options-display-header-footer`,`pdf-options-format`,`pdf-options-landscape`,`pdf-options-omit-background`,`pdf-options-outline`,`pdf-options-prefer-csspage-size`,`pdf-options-print-background`,`pdf-options-tagged`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`,`text`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action pdf`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/pdf`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),pdfOptions:{displayHeaderFooter:e[`pdf-options-display-header-footer`],footerTemplate:g(e[`pdf-options-footer-template`],`pdf-options-footer-template`,`text`),format:e[`pdf-options-format`],headerTemplate:g(e[`pdf-options-header-template`],`pdf-options-header-template`,`text`),height:f(e[`pdf-options-height`],`pdf-options-height`),landscape:e[`pdf-options-landscape`],margin:{bottom:f(e[`pdf-options-margin-bottom`],`pdf-options-margin-bottom`),left:f(e[`pdf-options-margin-left`],`pdf-options-margin-left`),right:f(e[`pdf-options-margin-right`],`pdf-options-margin-right`),top:f(e[`pdf-options-margin-top`],`pdf-options-margin-top`)},omitBackground:e[`pdf-options-omit-background`],outline:e[`pdf-options-outline`],pageRanges:g(e[`pdf-options-page-ranges`],`pdf-options-page-ranges`,`text`),preferCSSPageSize:e[`pdf-options-prefer-csspage-size`],printBackground:e[`pdf-options-print-background`],scale:e[`pdf-options-scale`],tagged:e[`pdf-options-tagged`],timeout:e[`pdf-options-timeout`],width:f(e[`pdf-options-width`],`pdf-options-width`)},rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}await r(e);let o=e.local?t:await a();if(e.accountId=o,e.body){let t=d(e.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Creating`,async()=>y(`/accounts/${o}/browser-rendering/pdf${r?`?`+r:``}`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(t),contentType:`application/json`}));v(e.text===!0?i.toString(`utf-8`):i);return}let l={};e[`action-timeout`]!==void 0&&m(l,[`actionTimeout`],e[`action-timeout`]),e[`add-script-tag`]!==void 0&&m(l,[`addScriptTag`],u(e[`add-script-tag`],`add-script-tag`)),e[`add-style-tag`]!==void 0&&m(l,[`addStyleTag`],u(e[`add-style-tag`],`add-style-tag`)),e[`allow-request-pattern`]!==void 0&&m(l,[`allowRequestPattern`],e[`allow-request-pattern`]),e[`allow-resource-types`]!==void 0&&m(l,[`allowResourceTypes`],e[`allow-resource-types`]),e[`authenticate-password`]!==void 0&&m(l,[`authenticate`,`password`],g(e[`authenticate-password`],`authenticate-password`,`text`)),e[`authenticate-username`]!==void 0&&m(l,[`authenticate`,`username`],g(e[`authenticate-username`],`authenticate-username`,`text`)),e[`best-attempt`]!==void 0&&m(l,[`bestAttempt`],e[`best-attempt`]),e.cookies!==void 0&&m(l,[`cookies`],u(e.cookies,`cookies`)),e[`emulate-media-type`]!==void 0&&m(l,[`emulateMediaType`],g(e[`emulate-media-type`],`emulate-media-type`,`text`)),e[`goto-options-referer`]!==void 0&&m(l,[`gotoOptions`,`referer`],g(e[`goto-options-referer`],`goto-options-referer`,`text`)),e[`goto-options-referrer-policy`]!==void 0&&m(l,[`gotoOptions`,`referrerPolicy`],g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`)),e[`goto-options-timeout`]!==void 0&&m(l,[`gotoOptions`,`timeout`],e[`goto-options-timeout`]),e.html!==void 0&&m(l,[`html`],g(e.html,`html`,`text`)),e[`pdf-options-display-header-footer`]!==void 0&&m(l,[`pdfOptions`,`displayHeaderFooter`],e[`pdf-options-display-header-footer`]),e[`pdf-options-footer-template`]!==void 0&&m(l,[`pdfOptions`,`footerTemplate`],g(e[`pdf-options-footer-template`],`pdf-options-footer-template`,`text`)),e[`pdf-options-format`]!==void 0&&m(l,[`pdfOptions`,`format`],e[`pdf-options-format`]),e[`pdf-options-header-template`]!==void 0&&m(l,[`pdfOptions`,`headerTemplate`],g(e[`pdf-options-header-template`],`pdf-options-header-template`,`text`)),e[`pdf-options-height`]!==void 0&&m(l,[`pdfOptions`,`height`],f(e[`pdf-options-height`],`pdf-options-height`)),e[`pdf-options-landscape`]!==void 0&&m(l,[`pdfOptions`,`landscape`],e[`pdf-options-landscape`]),e[`pdf-options-margin-bottom`]!==void 0&&m(l,[`pdfOptions`,`margin`,`bottom`],f(e[`pdf-options-margin-bottom`],`pdf-options-margin-bottom`)),e[`pdf-options-margin-left`]!==void 0&&m(l,[`pdfOptions`,`margin`,`left`],f(e[`pdf-options-margin-left`],`pdf-options-margin-left`)),e[`pdf-options-margin-right`]!==void 0&&m(l,[`pdfOptions`,`margin`,`right`],f(e[`pdf-options-margin-right`],`pdf-options-margin-right`)),e[`pdf-options-margin-top`]!==void 0&&m(l,[`pdfOptions`,`margin`,`top`],f(e[`pdf-options-margin-top`],`pdf-options-margin-top`)),e[`pdf-options-omit-background`]!==void 0&&m(l,[`pdfOptions`,`omitBackground`],e[`pdf-options-omit-background`]),e[`pdf-options-outline`]!==void 0&&m(l,[`pdfOptions`,`outline`],e[`pdf-options-outline`]),e[`pdf-options-page-ranges`]!==void 0&&m(l,[`pdfOptions`,`pageRanges`],g(e[`pdf-options-page-ranges`],`pdf-options-page-ranges`,`text`)),e[`pdf-options-prefer-csspage-size`]!==void 0&&m(l,[`pdfOptions`,`preferCSSPageSize`],e[`pdf-options-prefer-csspage-size`]),e[`pdf-options-print-background`]!==void 0&&m(l,[`pdfOptions`,`printBackground`],e[`pdf-options-print-background`]),e[`pdf-options-scale`]!==void 0&&m(l,[`pdfOptions`,`scale`],e[`pdf-options-scale`]),e[`pdf-options-tagged`]!==void 0&&m(l,[`pdfOptions`,`tagged`],e[`pdf-options-tagged`]),e[`pdf-options-timeout`]!==void 0&&m(l,[`pdfOptions`,`timeout`],e[`pdf-options-timeout`]),e[`pdf-options-width`]!==void 0&&m(l,[`pdfOptions`,`width`],f(e[`pdf-options-width`],`pdf-options-width`)),e[`reject-request-pattern`]!==void 0&&m(l,[`rejectRequestPattern`],e[`reject-request-pattern`]),e[`reject-resource-types`]!==void 0&&m(l,[`rejectResourceTypes`],e[`reject-resource-types`]),e[`set-extra-httpheaders`]!==void 0&&m(l,[`setExtraHTTPHeaders`],p(e[`set-extra-httpheaders`],`set-extra-httpheaders`)),e[`set-java-script-enabled`]!==void 0&&m(l,[`setJavaScriptEnabled`],e[`set-java-script-enabled`]),e.url!==void 0&&m(l,[`url`],g(e.url,`url`,`text`)),e[`user-agent`]!==void 0&&m(l,[`userAgent`],g(e[`user-agent`],`user-agent`,`text`)),e[`viewport-device-scale-factor`]!==void 0&&m(l,[`viewport`,`deviceScaleFactor`],e[`viewport-device-scale-factor`]),e[`viewport-has-touch`]!==void 0&&m(l,[`viewport`,`hasTouch`],e[`viewport-has-touch`]),e[`viewport-height`]!==void 0&&m(l,[`viewport`,`height`],e[`viewport-height`]),e[`viewport-is-landscape`]!==void 0&&m(l,[`viewport`,`isLandscape`],e[`viewport-is-landscape`]),e[`viewport-is-mobile`]!==void 0&&m(l,[`viewport`,`isMobile`],e[`viewport-is-mobile`]),e[`viewport-width`]!==void 0&&m(l,[`viewport`,`width`],e[`viewport-width`]),e[`wait-for-selector-hidden`]!==void 0&&m(l,[`waitForSelector`,`hidden`],e[`wait-for-selector-hidden`]),e[`wait-for-selector-selector`]!==void 0&&m(l,[`waitForSelector`,`selector`],g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`)),e[`wait-for-selector-timeout`]!==void 0&&m(l,[`waitForSelector`,`timeout`],e[`wait-for-selector-timeout`]),e[`wait-for-selector-visible`]!==void 0&&m(l,[`waitForSelector`,`visible`],e[`wait-for-selector-visible`]),e[`wait-for-timeout`]!==void 0&&m(l,[`waitForTimeout`],e[`wait-for-timeout`]);let _=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),b=await c(`Creating`,async()=>y(`/accounts/${o}/browser-rendering/pdf${_?`?`+_:``}`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(l).length>0?l:void 0}));v(e.text===!0?b.toString(`utf-8`):b)})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/scrape`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function Ve(e){return e.usage(`$0 browser-run quick-action scrape
|
|
35
|
-
|
|
36
|
-
Get meta attributes like height, width, text and others of selected elements.`).option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`elements`,{type:`string`,description:`The elements field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const He={command:`scrape`,describe:`Scrape elements.`,builder:Ve,handler:async e=>l({command:`browser-run quick-action scrape`,classification:{safeFlags:[`browser`,`best-attempt`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action scrape`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/scrape`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),elements:u(e.elements,`elements`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(Z,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}if(e.elements===void 0)throw Error(`--elements is required (or pass --body with this field set).`);let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),elements:u(e.elements,`elements`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send(Z,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})};function Q(e){return e.usage("$0 browser-run quick-action screenshot\n\nTakes a screenshot of a webpage from provided URL or HTML. Control page loading with `gotoOptions` and `waitFor*` options. Customize screenshots with `viewport`, `fullPage`, `clip` and others.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`screenshot-options-capture-beyond-viewport`,{type:`boolean`,description:`The screenshotOptions.captureBeyondViewport field`}).option(`screenshot-options-clip-height`,{type:`number`,description:`The screenshotOptions.clip.height field`}).option(`screenshot-options-clip-scale`,{type:`number`,description:`The screenshotOptions.clip.scale field`}).option(`screenshot-options-clip-width`,{type:`number`,description:`The screenshotOptions.clip.width field`}).option(`screenshot-options-clip-x`,{type:`number`,description:`The screenshotOptions.clip.x field`}).option(`screenshot-options-clip-y`,{type:`number`,description:`The screenshotOptions.clip.y field`}).option(`screenshot-options-encoding`,{type:`string`,description:`The screenshotOptions.encoding field`,choices:[`binary`,`base64`]}).coerce(`screenshot-options-encoding`,e=>g(e,`screenshot-options-encoding`,`text`)).option(`screenshot-options-from-surface`,{type:`boolean`,description:`The screenshotOptions.fromSurface field`}).option(`screenshot-options-full-page`,{type:`boolean`,description:`The screenshotOptions.fullPage field`}).option(`screenshot-options-omit-background`,{type:`boolean`,description:`The screenshotOptions.omitBackground field`}).option(`screenshot-options-optimize-for-speed`,{type:`boolean`,description:`The screenshotOptions.optimizeForSpeed field`}).option(`screenshot-options-quality`,{type:`number`,description:`The screenshotOptions.quality field`}).option(`screenshot-options-type`,{type:`string`,description:`The screenshotOptions.type field`,choices:[`png`,`jpeg`,`webp`]}).coerce(`screenshot-options-type`,e=>g(e,`screenshot-options-type`,`text`)).option(`scroll-page`,{type:`boolean`,description:`The scrollPage field`}).option(`selector`,{type:`string`,description:`The selector field`}).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1}).check(e=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`screenshot-options-clip-height`,`screenshot-options-clip-scale`,`screenshot-options-clip-width`,`screenshot-options-clip-x`,`screenshot-options-clip-y`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`screenshot-options-clip-height`,`screenshot-options-clip-width`,`screenshot-options-clip-x`,`screenshot-options-clip-y`].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 --screenshot-options-clip-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Ue={command:`screenshot`,describe:`Get screenshot.`,builder:Q,handler:async e=>l({command:`browser-run quick-action screenshot`,classification:{safeFlags:[`browser`,`best-attempt`,`screenshot-options-capture-beyond-viewport`,`screenshot-options-encoding`,`screenshot-options-from-surface`,`screenshot-options-full-page`,`screenshot-options-omit-background`,`screenshot-options-optimize-for-speed`,`screenshot-options-type`,`scroll-page`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`,`text`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action screenshot`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/screenshot`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],screenshotOptions:{captureBeyondViewport:e[`screenshot-options-capture-beyond-viewport`],clip:{height:e[`screenshot-options-clip-height`],scale:e[`screenshot-options-clip-scale`],width:e[`screenshot-options-clip-width`],x:e[`screenshot-options-clip-x`],y:e[`screenshot-options-clip-y`]},encoding:e[`screenshot-options-encoding`],fromSurface:e[`screenshot-options-from-surface`],fullPage:e[`screenshot-options-full-page`],omitBackground:e[`screenshot-options-omit-background`],optimizeForSpeed:e[`screenshot-options-optimize-for-speed`],quality:e[`screenshot-options-quality`],type:e[`screenshot-options-type`]},scrollPage:e[`scroll-page`],selector:g(e.selector,`selector`,`text`),setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}await r(e);let o=e.local?t:await a();if(e.accountId=o,e.body){let t=d(e.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Creating`,async()=>y(`/accounts/${o}/browser-rendering/screenshot${r?`?`+r:``}`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(t),contentType:`application/json`}));v(e.text===!0?i.toString(`utf-8`):i);return}let l={};e[`action-timeout`]!==void 0&&m(l,[`actionTimeout`],e[`action-timeout`]),e[`add-script-tag`]!==void 0&&m(l,[`addScriptTag`],u(e[`add-script-tag`],`add-script-tag`)),e[`add-style-tag`]!==void 0&&m(l,[`addStyleTag`],u(e[`add-style-tag`],`add-style-tag`)),e[`allow-request-pattern`]!==void 0&&m(l,[`allowRequestPattern`],e[`allow-request-pattern`]),e[`allow-resource-types`]!==void 0&&m(l,[`allowResourceTypes`],e[`allow-resource-types`]),e[`authenticate-password`]!==void 0&&m(l,[`authenticate`,`password`],g(e[`authenticate-password`],`authenticate-password`,`text`)),e[`authenticate-username`]!==void 0&&m(l,[`authenticate`,`username`],g(e[`authenticate-username`],`authenticate-username`,`text`)),e[`best-attempt`]!==void 0&&m(l,[`bestAttempt`],e[`best-attempt`]),e.cookies!==void 0&&m(l,[`cookies`],u(e.cookies,`cookies`)),e[`emulate-media-type`]!==void 0&&m(l,[`emulateMediaType`],g(e[`emulate-media-type`],`emulate-media-type`,`text`)),e[`goto-options-referer`]!==void 0&&m(l,[`gotoOptions`,`referer`],g(e[`goto-options-referer`],`goto-options-referer`,`text`)),e[`goto-options-referrer-policy`]!==void 0&&m(l,[`gotoOptions`,`referrerPolicy`],g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`)),e[`goto-options-timeout`]!==void 0&&m(l,[`gotoOptions`,`timeout`],e[`goto-options-timeout`]),e.html!==void 0&&m(l,[`html`],g(e.html,`html`,`text`)),e[`reject-request-pattern`]!==void 0&&m(l,[`rejectRequestPattern`],e[`reject-request-pattern`]),e[`reject-resource-types`]!==void 0&&m(l,[`rejectResourceTypes`],e[`reject-resource-types`]),e[`screenshot-options-capture-beyond-viewport`]!==void 0&&m(l,[`screenshotOptions`,`captureBeyondViewport`],e[`screenshot-options-capture-beyond-viewport`]),e[`screenshot-options-clip-height`]!==void 0&&m(l,[`screenshotOptions`,`clip`,`height`],e[`screenshot-options-clip-height`]),e[`screenshot-options-clip-scale`]!==void 0&&m(l,[`screenshotOptions`,`clip`,`scale`],e[`screenshot-options-clip-scale`]),e[`screenshot-options-clip-width`]!==void 0&&m(l,[`screenshotOptions`,`clip`,`width`],e[`screenshot-options-clip-width`]),e[`screenshot-options-clip-x`]!==void 0&&m(l,[`screenshotOptions`,`clip`,`x`],e[`screenshot-options-clip-x`]),e[`screenshot-options-clip-y`]!==void 0&&m(l,[`screenshotOptions`,`clip`,`y`],e[`screenshot-options-clip-y`]),e[`screenshot-options-encoding`]!==void 0&&m(l,[`screenshotOptions`,`encoding`],e[`screenshot-options-encoding`]),e[`screenshot-options-from-surface`]!==void 0&&m(l,[`screenshotOptions`,`fromSurface`],e[`screenshot-options-from-surface`]),e[`screenshot-options-full-page`]!==void 0&&m(l,[`screenshotOptions`,`fullPage`],e[`screenshot-options-full-page`]),e[`screenshot-options-omit-background`]!==void 0&&m(l,[`screenshotOptions`,`omitBackground`],e[`screenshot-options-omit-background`]),e[`screenshot-options-optimize-for-speed`]!==void 0&&m(l,[`screenshotOptions`,`optimizeForSpeed`],e[`screenshot-options-optimize-for-speed`]),e[`screenshot-options-quality`]!==void 0&&m(l,[`screenshotOptions`,`quality`],e[`screenshot-options-quality`]),e[`screenshot-options-type`]!==void 0&&m(l,[`screenshotOptions`,`type`],e[`screenshot-options-type`]),e[`scroll-page`]!==void 0&&m(l,[`scrollPage`],e[`scroll-page`]),e.selector!==void 0&&m(l,[`selector`],g(e.selector,`selector`,`text`)),e[`set-extra-httpheaders`]!==void 0&&m(l,[`setExtraHTTPHeaders`],p(e[`set-extra-httpheaders`],`set-extra-httpheaders`)),e[`set-java-script-enabled`]!==void 0&&m(l,[`setJavaScriptEnabled`],e[`set-java-script-enabled`]),e.url!==void 0&&m(l,[`url`],g(e.url,`url`,`text`)),e[`user-agent`]!==void 0&&m(l,[`userAgent`],g(e[`user-agent`],`user-agent`,`text`)),e[`viewport-device-scale-factor`]!==void 0&&m(l,[`viewport`,`deviceScaleFactor`],e[`viewport-device-scale-factor`]),e[`viewport-has-touch`]!==void 0&&m(l,[`viewport`,`hasTouch`],e[`viewport-has-touch`]),e[`viewport-height`]!==void 0&&m(l,[`viewport`,`height`],e[`viewport-height`]),e[`viewport-is-landscape`]!==void 0&&m(l,[`viewport`,`isLandscape`],e[`viewport-is-landscape`]),e[`viewport-is-mobile`]!==void 0&&m(l,[`viewport`,`isMobile`],e[`viewport-is-mobile`]),e[`viewport-width`]!==void 0&&m(l,[`viewport`,`width`],e[`viewport-width`]),e[`wait-for-selector-hidden`]!==void 0&&m(l,[`waitForSelector`,`hidden`],e[`wait-for-selector-hidden`]),e[`wait-for-selector-selector`]!==void 0&&m(l,[`waitForSelector`,`selector`],g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`)),e[`wait-for-selector-timeout`]!==void 0&&m(l,[`waitForSelector`,`timeout`],e[`wait-for-selector-timeout`]),e[`wait-for-selector-visible`]!==void 0&&m(l,[`waitForSelector`,`visible`],e[`wait-for-selector-visible`]),e[`wait-for-timeout`]!==void 0&&m(l,[`waitForTimeout`],e[`wait-for-timeout`]);let f=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),_=await c(`Creating`,async()=>y(`/accounts/${o}/browser-rendering/screenshot${f?`?`+f:``}`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(l).length>0?l:void 0}));v(e.text===!0?_.toString(`utf-8`):_)})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/browser-rendering/snapshot`,query:[`cacheTTL`,`browser`],body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function We(e){return e.usage("$0 browser-run quick-action snapshot\n\nReturns the page's HTML content and screenshot. Control page loading with `gotoOptions` and `waitFor*` options. Customize screenshots with `viewport`, `fullPage`, `clip` and others.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`browser`,{type:`string`,description:"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).",choices:[`kitesurf`]}).option(`action-timeout`,{type:`number`,description:`The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.`}).option(`add-script-tag`,{type:`string`,description:`Adds a script element into the page with the desired URL or content. Provide as a JSON array of objects or @path/to/file.json.`}).option(`add-style-tag`,{type:`string`,description:'Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. Provide as a JSON array of objects or @path/to/file.json.'}).option(`allow-request-pattern`,{type:`string`,array:!0,description:`Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.`}).option(`allow-resource-types`,{type:`string`,array:!0,description:`Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.`}).option(`authenticate-password`,{type:`string`,description:`The authenticate.password field`}).option(`authenticate-username`,{type:`string`,description:`The authenticate.username field`}).option(`best-attempt`,{type:`boolean`,description:`Attempt to proceed when 'awaited' events fail or timeout.`}).option(`cookies`,{type:`string`,description:`Check [options](https://pptr.dev/api/puppeteer.page.setcookie). Provide as a JSON array of objects or @path/to/file.json.`}).option(`emulate-media-type`,{type:`string`,description:`The emulateMediaType field`}).option(`formats`,{type:`string`,array:!0,description:`The formats field`}).option(`goto-options-referer`,{type:`string`,description:`The gotoOptions.referer field`}).option(`goto-options-referrer-policy`,{type:`string`,description:`The gotoOptions.referrerPolicy field`}).option(`goto-options-timeout`,{type:`number`,description:`The gotoOptions.timeout field`}).option(`html`,{type:`string`,description:"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set."}).option(`reject-request-pattern`,{type:`string`,array:!0,description:`Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.`}).option(`reject-resource-types`,{type:`string`,array:!0,description:`Block undesired requests that match the provided resource types, eg. 'image' or 'script'.`}).option(`screenshot-options-capture-beyond-viewport`,{type:`boolean`,description:`The screenshotOptions.captureBeyondViewport field`}).option(`screenshot-options-clip-height`,{type:`number`,description:`The screenshotOptions.clip.height field`}).option(`screenshot-options-clip-scale`,{type:`number`,description:`The screenshotOptions.clip.scale field`}).option(`screenshot-options-clip-width`,{type:`number`,description:`The screenshotOptions.clip.width field`}).option(`screenshot-options-clip-x`,{type:`number`,description:`The screenshotOptions.clip.x field`}).option(`screenshot-options-clip-y`,{type:`number`,description:`The screenshotOptions.clip.y field`}).option(`screenshot-options-from-surface`,{type:`boolean`,description:`The screenshotOptions.fromSurface field`}).option(`screenshot-options-full-page`,{type:`boolean`,description:`The screenshotOptions.fullPage field`}).option(`screenshot-options-omit-background`,{type:`boolean`,description:`The screenshotOptions.omitBackground field`}).option(`screenshot-options-optimize-for-speed`,{type:`boolean`,description:`The screenshotOptions.optimizeForSpeed field`}).option(`screenshot-options-quality`,{type:`number`,description:`The screenshotOptions.quality field`}).option(`screenshot-options-type`,{type:`string`,description:`The screenshotOptions.type field`,choices:[`png`,`jpeg`,`webp`]}).coerce(`screenshot-options-type`,e=>g(e,`screenshot-options-type`,`text`)).option(`set-extra-httpheaders`,{type:`string`,description:`The setExtraHTTPHeaders field. Provide as a JSON object or @path/to/file.json.`}).option(`set-java-script-enabled`,{type:`boolean`,description:`The setJavaScriptEnabled field`}).option(`url`,{type:`string`,description:"URL to navigate to, eg. `https://example.com`."}).option(`user-agent`,{type:`string`,description:`The userAgent field`,default:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36`}).option(`viewport-device-scale-factor`,{type:`number`,description:`The viewport.deviceScaleFactor field`}).option(`viewport-has-touch`,{type:`boolean`,description:`The viewport.hasTouch field`}).option(`viewport-height`,{type:`number`,description:`The viewport.height field`}).option(`viewport-is-landscape`,{type:`boolean`,description:`The viewport.isLandscape field`}).option(`viewport-is-mobile`,{type:`boolean`,description:`The viewport.isMobile field`}).option(`viewport-width`,{type:`number`,description:`The viewport.width field`}).option(`wait-for-selector-hidden`,{type:`boolean`,description:`The waitForSelector.hidden field`}).option(`wait-for-selector-selector`,{type:`string`,description:`The waitForSelector.selector field`}).option(`wait-for-selector-timeout`,{type:`number`,description:`The waitForSelector.timeout field`}).option(`wait-for-selector-visible`,{type:`boolean`,description:`The waitForSelector.visible field`}).option(`wait-for-timeout`,{type:`number`,description:`Waits for a specified timeout before continuing.`}).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=>{let t=[`authenticate-password`,`authenticate-username`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`authenticate-password`,`authenticate-username`].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 --authenticate-* flag is set`)}return!0}).check(e=>{let t=[`screenshot-options-clip-height`,`screenshot-options-clip-scale`,`screenshot-options-clip-width`,`screenshot-options-clip-x`,`screenshot-options-clip-y`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`screenshot-options-clip-height`,`screenshot-options-clip-width`,`screenshot-options-clip-x`,`screenshot-options-clip-y`].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 --screenshot-options-clip-* flag is set`)}return!0}).check(e=>{let t=[`viewport-device-scale-factor`,`viewport-has-touch`,`viewport-height`,`viewport-is-landscape`,`viewport-is-mobile`,`viewport-width`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`viewport-height`,`viewport-width`].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 --viewport-* flag is set`)}return!0}).check(e=>{let t=[`wait-for-selector-hidden`,`wait-for-selector-selector`,`wait-for-selector-timeout`,`wait-for-selector-visible`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`wait-for-selector-selector`].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 --wait-for-selector-* flag is set`)}return!0})}const Ge={command:`snapshot`,describe:`Get HTML content and screenshot.`,builder:We,handler:async e=>l({command:`browser-run quick-action snapshot`,classification:{safeFlags:[`browser`,`best-attempt`,`screenshot-options-capture-beyond-viewport`,`screenshot-options-from-surface`,`screenshot-options-full-page`,`screenshot-options-omit-background`,`screenshot-options-optimize-for-speed`,`screenshot-options-type`,`set-java-script-enabled`,`viewport-has-touch`,`viewport-is-landscape`,`viewport-is-mobile`,`wait-for-selector-hidden`,`wait-for-selector-visible`,`dry-run`]}},e,async()=>{let n={cacheTTL:e[`cache-ttl`],browser:e.browser};if(e.dryRun){let t=await i();s({command:`cf browser-run quick-action snapshot`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/snapshot`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),formats:e.formats,gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],screenshotOptions:{captureBeyondViewport:e[`screenshot-options-capture-beyond-viewport`],clip:{height:e[`screenshot-options-clip-height`],scale:e[`screenshot-options-clip-scale`],width:e[`screenshot-options-clip-width`],x:e[`screenshot-options-clip-x`],y:e[`screenshot-options-clip-y`]},fromSurface:e[`screenshot-options-from-surface`],fullPage:e[`screenshot-options-full-page`],omitBackground:e[`screenshot-options-omit-background`],optimizeForSpeed:e[`screenshot-options-optimize-for-speed`],quality:e[`screenshot-options-quality`],type:e[`screenshot-options-type`]},setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]):d(e.body),sensitiveBodyPaths:[[`authenticate`,`password`]]});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send($,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}let m=h({actionTimeout:e[`action-timeout`],addScriptTag:u(e[`add-script-tag`],`add-script-tag`),addStyleTag:u(e[`add-style-tag`],`add-style-tag`),allowRequestPattern:e[`allow-request-pattern`],allowResourceTypes:e[`allow-resource-types`],authenticate:{password:g(e[`authenticate-password`],`authenticate-password`,`text`),username:g(e[`authenticate-username`],`authenticate-username`,`text`)},bestAttempt:e[`best-attempt`],cookies:u(e.cookies,`cookies`),emulateMediaType:g(e[`emulate-media-type`],`emulate-media-type`,`text`),formats:e.formats,gotoOptions:{referer:g(e[`goto-options-referer`],`goto-options-referer`,`text`),referrerPolicy:g(e[`goto-options-referrer-policy`],`goto-options-referrer-policy`,`text`),timeout:e[`goto-options-timeout`]},html:g(e.html,`html`,`text`),rejectRequestPattern:e[`reject-request-pattern`],rejectResourceTypes:e[`reject-resource-types`],screenshotOptions:{captureBeyondViewport:e[`screenshot-options-capture-beyond-viewport`],clip:{height:e[`screenshot-options-clip-height`],scale:e[`screenshot-options-clip-scale`],width:e[`screenshot-options-clip-width`],x:e[`screenshot-options-clip-x`],y:e[`screenshot-options-clip-y`]},fromSurface:e[`screenshot-options-from-surface`],fullPage:e[`screenshot-options-full-page`],omitBackground:e[`screenshot-options-omit-background`],optimizeForSpeed:e[`screenshot-options-optimize-for-speed`],quality:e[`screenshot-options-quality`],type:e[`screenshot-options-type`]},setExtraHTTPHeaders:p(e[`set-extra-httpheaders`],`set-extra-httpheaders`),setJavaScriptEnabled:e[`set-java-script-enabled`],url:g(e.url,`url`,`text`),userAgent:g(e[`user-agent`],`user-agent`,`text`),viewport:{deviceScaleFactor:e[`viewport-device-scale-factor`],hasTouch:e[`viewport-has-touch`],height:e[`viewport-height`],isLandscape:e[`viewport-is-landscape`],isMobile:e[`viewport-is-mobile`],width:e[`viewport-width`]},waitForSelector:{hidden:e[`wait-for-selector-hidden`],selector:g(e[`wait-for-selector-selector`],`wait-for-selector-selector`,`text`),timeout:e[`wait-for-selector-timeout`],visible:e[`wait-for-selector-visible`]},waitForTimeout:e[`wait-for-timeout`]},[[`setExtraHTTPHeaders`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await c(`Creating`,async()=>l.send($,{body:m,account_id:f,...n}));o(_,{successLabel:`Created`})})},Ke={command:`quick-action`,describe:`Operations for quick-action`,builder:e=>e.command(Ae).command(Me).command(Pe).command(Ie).command(Re).command(Be).command(He).command(Ue).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/recording/${t.session_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Je(e){return e.usage(`$0 browser-run recording get <session-id>
|
|
37
|
-
|
|
38
|
-
Returns the recording data for a given session as a dictionary of events per targetId.`).positional(`session-id`,{type:`string`,description:`Session ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`get <session-id>`,describe:`Get recording data.`,builder:Je,handler:async e=>l({command:`browser-run recording get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf browser-run recording get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/recording/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}`,pathParams:{"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(qe,{account_id:l,session_id:e[`session-id`]}));o(u,{successLabel:`Loaded`})})};var Xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/browser-rendering/recording/${t.session_id}/network`,query:[`format`,`target`],errors:{404:`NotFoundError`,500:`InternalServerError`}};function Ze(e){return e.usage(`$0 browser-run recording network get <session-id>
|
|
39
|
-
|
|
40
|
-
Returns network recording events for the requested target ID. Use ?format=har for a HAR JSON document.`).positional(`session-id`,{type:`string`,description:`Session ID.`,demandOption:!0}).option(`format`,{type:`string`,description:"Set to `har` to return a HAR JSON document."}).option(`target`,{type:`string`,description:`Target ID to include in the response.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`get <session-id>`,describe:`Get network recording data.`,builder:Ze,handler:async e=>l({command:`browser-run recording network get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={format:e.format,target:e.target};if(e.dryRun){let t=await i();s({command:`cf browser-run recording network get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/browser-rendering/recording/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/network`,pathParams:{"session-id":String(e[`session-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Xe,{account_id:u,session_id:e[`session-id`],...n}));o(d,{successLabel:`Loaded`})})},$e={command:`network`,describe:`Operations for recording.network`,builder:e=>e.command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},et={command:`recording`,describe:`Operations for recording`,builder:e=>e.command(Ye).command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},tt={command:`browser-run`,describe:`browser-run`,builder:e=>e.command(se).command(Oe).command(Ke).command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{tt as default};
|
package/dist/build-CRm2TQq8.mjs
DELETED
package/dist/build-DO_GNhRl.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{M as t}from"./dist-D5qkmHhC.mjs";import{i as n,r}from"./autoconfig-B2w-woU0.mjs";import{t as i}from"./log-BWdaOGOW.mjs";import{n as a,t as o}from"./spawn-DuT4snxu.mjs";import s from"node:path";import{readBuildOutput as c}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as l}from"@cloudflare/config";var u=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function d(e,t){if(e!==void 0){if(t===void 0)throw new u(`The Build Output does not record which mode it was created with, but this command requested mode "${e}". Rebuild with "--mode ${e}" before deploying.`);if(t!==e)throw new u(`The Build Output was created with mode "${t}", but this command requested mode "${e}". To use the existing Build Output, rerun with "--mode ${t}". To deploy in ${e} mode, rebuild with "--mode ${e}" before deploying.`)}}function f(e,t){if(e!==void 0&&t)throw new u(`Temporary accounts can't be used when a specific account ID ("${e}") is set in your config file. Remove \`--temporary-account\` to use that account, or remove \`accountId\` from your config file and rebuild to use a temporary account.`)}const p={type:`string`,description:`Name of the Worker in the Build Output to use (defaults to the default Worker)`,requiresArg:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--worker can only be specified once.`);return e}};function m(e,t){if(t===void 0)return e.default;let n=Object.values(e).filter(e=>e.config.name===t);if(n.length>1)throw new u(`The Build Output contains more than one Worker named "${t}".`);if(n[0]!==void 0)return n[0];let{default:r,...i}=e;throw new u(`The Build Output has no Worker named "${t}". Available Workers: ${[`${r.config.name} (default)`,...Object.values(i).map(e=>e.config.name).sort()].join(`, `)}.`)}function h(e,t){let n=e.config,{buildContext:r,...i}=t,{manifest:a,...o}=n,c=l({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(c.main=s.join(e.bundleDir,n.manifest.mainModule));let u=s.resolve(`cloudflare.config.ts`),{validationConfig:d,containerReferences:f}=_(c),p=g(d,e.configPath,u);v(p,f);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,n,r){let{config:i,diagnostics:a}=t(e,n,r,{});if(a.hasErrors())throw new u(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=/* @__PURE__ */ new Map;return n.exports!==void 0&&(n.exports=Object.fromEntries(Object.entries(n.exports).map(([e,t])=>{if(!(`container`in t)||typeof t.container!=`string`)return[e,t];r.set(e,t.container);let{container:n,...i}=t;return[e,i]}))),{validationConfig:n,containerReferences:r}}function v(e,t){e.exports!==void 0&&t.size!==0&&(e.exports=Object.fromEntries(Object.entries(e.exports).map(([e,n])=>{let r=t.get(e);return[e,r===void 0?n:{...n,container:r}]})))}function y(e){return e}async function b(t,{worker:s,dryRun:l=!1,...u}={},d={}){let f=u.output??`stderr`,p=process.cwd(),{details:g,configuration:_,setupNeeded:v}=await r(p,{...u,dryRun:l});if(v)return`setup-needed`;let y=_?.buildCommand??g?.buildCommand,b={...g?.env,...d.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(y&&t&&!g?.framework?.supportsMode)throw Error(`The detected command \`${y}\` does not currently support \`--mode\`.`);f!==`silent`&&i.section(`Build`);let S=t?[`--mode`,t]:[],C;if(y)C=await n(y,p,{...u,env:b,args:S});else{let e=a(p);f!==`silent`&&i.message(`Delegating to ${x(e)}`),C=await o(e,`build`,S,{...u,env:b})}if(C.exitCode!==0||C.signal)throw new e(C.exitCode,{signal:C.signal});let{workers:w,rootConfig:T}=await c(p);return h(m(w,s),T),f!==`silent`&&i.success(`Build complete`),`built`}function x(e){switch(e.impl.pkg){case`@cloudflare/vite-plugin`:return`Vite`;case`wrangler`:return`Wrangler`;case`cloudflare-py-dev-server`:return`the Python dev server`;case`cloudflare-rs-dev-server`:return`the Rust dev server`;default:return e.impl.pkg}}const S={command:`build`,describe:`Build a project for Cloudflare`,builder:y,handler:async e=>{await b(e.mode)}};export{m as a,u as c,h as i,b as n,f as o,p as r,d as s,S as t};
|
package/dist/cache-jlLJLSu7.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-FK2eLQ02.mjs";import{i as r}from"./context-Dp4CXG22.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-DLri-rA7.mjs";import{t as s}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(m,{body:t,zone_id:l,environment_id:e[`environment-id`]}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};var ee={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function te(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`invalidate`,describe:`Invalidate Cached Content`,builder:te,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(ee,{body:t,zone_id:l}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){if(e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Deleting: batch ${l}/${r}`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Deleted`});return}let r=await o(`Deleting`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};function ae(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:ae,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Updating: batch ${l}/${r}`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Updated`});return}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},v={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
|
|
3
|
-
|
|
4
|
-
Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 x={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:b,handler:async e=>s({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`}))return;let c=await o(`Deleting`,async()=>t.send(y,{zone_id:s,origin_ip:e[`origin-ip`]}));i(c,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function C(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
|
|
5
|
-
|
|
6
|
-
Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 if the zone has no mappings or if the specified IP has no mapping.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address to look up. IPv4 and IPv6 are supported.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:C,handler:async e=>s({command:`cache origin-cloud-regions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(S,{zone_id:s,origin_ip:e[`origin-ip`]}));i(c,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 cache origin-cloud-regions list
|
|
7
|
-
|
|
8
|
-
Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List origin cloud region mappings`,builder:E,handler:async e=>s({command:`cache origin-cloud-regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf cache origin-cloud-regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let s=await n(e),c=await r({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await o(`Loading`,async()=>s.send(T,{zone_id:c,...t}));i(l,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/supported_regions`};function k(e){return e.usage(`$0 cache origin-cloud-regions regions list-supported
|
|
9
|
-
|
|
10
|
-
Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list-supported`,describe:`List supported cloud vendors and regions`,builder:k,handler:async e=>s({command:`cache origin-cloud-regions regions list-supported`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions regions list-supported`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/supported_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(O,{zone_id:s}));i(c,{successLabel:`Loaded`})})},j={command:`regions`,describe:`Operations for origin-cloud-regions.regions`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`,body:`json`};function N(e){return e.usage("$0 cache origin-cloud-regions update <origin-ip>\n\nCreates a new IP-to-cloud-region mapping or replaces the existing mapping for the specified IP. PUT is idempotent — calling it repeatedly with the same body produces the same result. The IP path parameter is normalized to canonical form (RFC 5952 for IPv6) before storage. The vendor and region are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`. Returns 400 if the `origin_ip` in the body does not match the URL path parameter. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings.").positional(`origin-ip`,{type:`string`,description:`Origin IP address to create or replace.`,demandOption:!0}).option(`region`,{type:`string`,description:`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`}).option(`vendor`,{type:`string`,description:`Cloud vendor hosting the origin. Must be one of the supported vendors.`,choices:[`aws`,`azure`,`gcp`,`oci`]}).coerce(`vendor`,e=>u(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or replacing an origin cloud region mapping.`})}const P={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:N,handler:async e=>s({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`json`,body:e.body===void 0?l({region:u(e.region,`region`,`text`),vendor:e.vendor}):c(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=c(e.body),r=await o(`Updating`,async()=>t.send(M,{body:n,zone_id:s,origin_ip:e[`origin-ip`]}));i(r,{successLabel:`Updated`});return}e.region===void 0&&(e.region=await d(`region`,`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`)),e.vendor===void 0&&(e.vendor=await f(`vendor`,`Cloud vendor hosting the origin. Must be one of the supported vendors.`,[`aws`,`azure`,`gcp`,`oci`]));let p=l({region:u(e.region,`region`,`text`),vendor:e.vendor}),m=await o(`Updating`,async()=>t.send(M,{body:p,zone_id:s,origin_ip:e[`origin-ip`]}));i(m,{successLabel:`Updated`})})},F={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(x).command(w).command(D).command(P).command(v).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/purge_cache`,body:`json`};function L(e){return e.usage("$0 cache purge-environment <environment-id>\n\nDeletes cached content for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/purge_cache`: the next request for purged content is a cache `MISS`, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To keep content cached and have Cloudflare revalidate it instead, use `POST /zones/{zone_id}/environments/{environment_id}/invalidate_cache`. Purging by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:L,handler:async e=>s({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation deletes the selected content from the environment's cache.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(I,{body:t,zone_id:l,environment_id:e[`environment-id`]}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/purge_cache`));i(u,{successLabel:`Deleted`})})};var z={method:`POST`,path:t=>e`/zones/${t.zone_id}/purge_cache`,body:`json`};function B(e){return e.usage("$0 cache purge\n\nDeletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache `MISS`: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable. To keep content cached and have Cloudflare revalidate it with your origin instead, use `POST /zones/{zone_id}/invalidate_cache`. ### Choose what to purge Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the `CF-Cache-Status` response header is `MISS`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`purge`,describe:`Purge Cached Content`,builder:B,handler:async e=>s({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation deletes the selected content from the zone's cache.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(z,{body:t,zone_id:l}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/purge_cache`));i(u,{successLabel:`Deleted`})})};var H={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`,body:`json`};function U(e){return e.usage(`$0 cache settings regional-tiered-cache edit
|
|
11
|
-
|
|
12
|
-
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`value`,{type:`string`,description:`Value of the Regional Tiered Cache zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`text`)).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 W={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:U,handler:async e=>s({command:`cache settings regional-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings regional-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=c(e.body),r=await o(`Updating`,async()=>t.send(H,{body:n,zone_id:s}));i(r,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await f(`value`,`Value of the Regional Tiered Cache zone setting.`,[`on`,`off`]));let u=l({value:e.value}),d=await o(`Updating`,async()=>t.send(H,{body:u,zone_id:s}));i(d,{successLabel:`Updated`})})};var G={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`};function K(e){return e.usage(`$0 cache settings regional-tiered-cache get
|
|
13
|
-
|
|
14
|
-
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:K,handler:async e=>s({command:`cache settings regional-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings regional-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(G,{zone_id:s}));i(c,{successLabel:`Loaded`})})},J={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`POST`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve_clear`};function se(e){return e.usage(`$0 cache settings reserve clear
|
|
15
|
-
|
|
16
|
-
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).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 ce={command:`clear`,describe:`Start Cache Reserve Clear`,builder:se,handler:async e=>s({command:`cache settings reserve clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let c=await o(`Deleting`,async()=>t.send(oe,{zone_id:s}));i(c,{successLabel:`Deleted`})})};var Y={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve`,body:`json`};function le(e){return e.usage(`$0 cache settings reserve edit
|
|
17
|
-
|
|
18
|
-
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`value`,{type:`string`,description:`Value of the Cache Reserve zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`text`)).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 ue={command:`edit`,describe:`Change Cache Reserve setting`,builder:le,handler:async e=>s({command:`cache settings reserve edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=c(e.body),r=await o(`Updating`,async()=>t.send(Y,{body:n,zone_id:s}));i(r,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await f(`value`,`Value of the Cache Reserve zone setting.`,[`on`,`off`]));let u=l({value:e.value}),d=await o(`Updating`,async()=>t.send(Y,{body:u,zone_id:s}));i(d,{successLabel:`Updated`})})};var de={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve`};function fe(e){return e.usage(`$0 cache settings reserve get
|
|
19
|
-
|
|
20
|
-
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get`,describe:`Get Cache Reserve setting`,builder:fe,handler:async e=>s({command:`cache settings reserve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(de,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve_clear`};function he(e){return e.usage(`$0 cache settings reserve status
|
|
21
|
-
|
|
22
|
-
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`status`,describe:`Get Cache Reserve Clear`,builder:he,handler:async e=>s({command:`cache settings reserve status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(me,{zone_id:s}));i(c,{successLabel:`Loaded`})})},_e={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(ce).command(ue).command(pe).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`,body:`json`};function ve(e){return e.usage(`$0 cache settings smart-tiered-cache create
|
|
23
|
-
|
|
24
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website's origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const ye={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:ve,handler:async e=>s({command:`cache settings smart-tiered-cache create`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=c(e.body),r=await o(`Creating`,async()=>t.send(X,{body:n,zone_id:s}));i(r,{successLabel:`Created`});return}e.value===void 0&&(e.value=await f(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let u=l({value:e.value}),d=await o(`Creating`,async()=>t.send(X,{body:u,zone_id:s}));i(d,{successLabel:`Created`})})};var be={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`};function xe(e){return e.usage(`$0 cache settings smart-tiered-cache delete
|
|
25
|
-
|
|
26
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).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 Se={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:xe,handler:async e=>s({command:`cache settings smart-tiered-cache delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await o(`Deleting`,async()=>t.send(be,{zone_id:s}));i(c,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`,body:`json`};function Ce(e){return e.usage(`$0 cache settings smart-tiered-cache edit
|
|
27
|
-
|
|
28
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const we={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:Ce,handler:async e=>s({command:`cache settings smart-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=c(e.body),r=await o(`Updating`,async()=>t.send(Z,{body:n,zone_id:s}));i(r,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await f(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let u=l({value:e.value}),d=await o(`Updating`,async()=>t.send(Z,{body:u,zone_id:s}));i(d,{successLabel:`Updated`})})};var Te={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`};function Ee(e){return e.usage(`$0 cache settings smart-tiered-cache get
|
|
29
|
-
|
|
30
|
-
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:Ee,handler:async e=>s({command:`cache settings smart-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(Te,{zone_id:s}));i(c,{successLabel:`Loaded`})})},Oe={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(ye).command(Se).command(we).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/cache/variants`};function ke(e){return e.usage(`$0 cache settings variants delete
|
|
31
|
-
|
|
32
|
-
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).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 Ae={command:`delete`,describe:`Delete variants setting`,builder:ke,handler:async e=>s({command:`cache settings variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache settings variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await o(`Deleting`,async()=>t.send(Q,{zone_id:s}));i(c,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/variants`,body:`json`};function je(e){return e.usage(`$0 cache settings variants edit
|
|
33
|
-
|
|
34
|
-
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`value-avif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for avif.`}).option(`value-bmp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for bmp.`}).option(`value-gif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for gif.`}).option(`value-jp2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jp2.`}).option(`value-jpeg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpeg.`}).option(`value-jpg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg.`}).option(`value-jpg2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg2.`}).option(`value-png`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for png.`}).option(`value-tif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tif.`}).option(`value-tiff`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tiff.`}).option(`value-webp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for webp.`}).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 Me={command:`edit`,describe:`Change variants setting`,builder:je,handler:async e=>s({command:`cache settings variants edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}):c(e.body)});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,e.body){let n=c(e.body),r=await o(`Updating`,async()=>t.send($,{body:n,zone_id:s}));i(r,{successLabel:`Updated`});return}let u=l({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}),d=await o(`Updating`,async()=>t.send($,{body:u,zone_id:s}));i(d,{successLabel:`Updated`})})};var Ne={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/variants`};function Pe(e){return e.usage(`$0 cache settings variants get
|
|
35
|
-
|
|
36
|
-
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`get`,describe:`Get variants setting`,builder:Pe,handler:async e=>s({command:`cache settings variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(Ne,{zone_id:s}));i(c,{successLabel:`Loaded`})})},Ie={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command(Ae).command(Me).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Le={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(J).command(_e).command(Oe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Re={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(ne).command(g).command(V).command(R).command(F).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Re as default};
|