cf 1.0.0-beta.26 → 1.0.0-beta.27
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 +1996 -3422
- package/dist/_meta/schemas.json +9249 -2339
- package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
- package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
- package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
- package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
- package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
- package/dist/ai-search-DbZIxdio.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
- package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
- package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
- package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
- package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
- package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
- package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
- package/dist/auth-CspwoBlp.mjs +2 -0
- package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
- package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
- package/dist/billing-DRNww0iC.mjs +24 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
- package/dist/body-unions-CjpNjwSW.mjs +2 -0
- package/dist/bot-management-fwxKIbaB.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
- package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
- package/dist/browser-run-CEk-NIgP.mjs +40 -0
- package/dist/build-CRm2TQq8.mjs +2 -0
- package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
- package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
- package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
- package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
- package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
- package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
- package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
- package/dist/containers-DINLx5_i.mjs +380 -0
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
- package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
- package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
- package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
- package/dist/custom-pages-DAkKVzgR.mjs +38 -0
- package/dist/d1-CDIyRdh4.mjs +52 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
- package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
- package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
- package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
- package/dist/email-domains-CDSbVclP.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
- package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
- package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
- package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
- package/dist/iam-8T74DNhH.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
- package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
- package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
- package/dist/k2-wsanPL3y.mjs +10 -0
- package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
- package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
- package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
- package/dist/local-CFsO9Tkg.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
- package/dist/login-BfuOf-Yi.mjs +2 -0
- package/dist/logpush-qhlxsioM.mjs +68 -0
- package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
- package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
- package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
- package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
- package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
- package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
- package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
- package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
- package/dist/observability-BxhJQCgZ.mjs +4 -0
- package/dist/organization-CEnlXwrl.mjs +70 -0
- package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
- package/dist/package-CiRJBRHO.mjs +2 -0
- package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
- package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
- package/dist/precursor-D3VH2MXT.mjs +4 -0
- package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
- package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
- package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
- package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
- package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
- package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
- package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
- package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
- package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
- package/dist/rulesets-CKyc-Xlx.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
- package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
- package/dist/run-DD45EQTm.mjs +2 -0
- package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
- package/dist/schema-flags-DrqvwQNw.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
- package/dist/security-insights-SlUGW3F_.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
- package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
- package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
- package/dist/src-DPnUfK4c.mjs +131 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
- package/dist/startup-profile-tZNb2HGz.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
- package/dist/state-Uwfrmw5I.mjs +2 -0
- package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
- package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
- package/dist/telemetry-Pt5GpCKD.mjs +2 -0
- package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
- package/dist/ui-FYultowZ.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
- package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
- package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
- package/dist/version-Zr2oF8mY.mjs +2 -0
- package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
- package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
- package/dist/workers-B3uJqJKc.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
- package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
- package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
- package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
- package/package.json +14 -14
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/containers-D4sa-Eoy.mjs +0 -380
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/k2-Cj1ORHul.mjs +0 -10
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-WB1FOuew.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-CgBhtmON.mjs";import{i,n as a}from"./auth-FK2eLQ02.mjs";import{a as o,t as s}from"./context-Dp4CXG22.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-DLri-rA7.mjs";import{t as d}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as f,r as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h,t as ee}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-D0dXwuME.mjs";var y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function te(e){return e.usage(`$0 pages build-cache purge <project-name>
|
|
3
3
|
|
|
4
4
|
Remove cached build artifacts so subsequent builds run without the project's existing build cache.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 ne={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:te,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation purges the build cache for a Pages project.`}))return;let i=await u(`Deleting`,async()=>t.send(y,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},re={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function x(e){return e.usage(`$0 pages create
|
|
5
5
|
|
|
6
6
|
Create a Cloudflare Pages project for configuring and deploying a site or application.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
7
7
|
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
8
|
-
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`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)`}).check(e=>{if((/* @__PURE__ */ `deployment-configs-preview-ai-bindings.deployment-configs-preview-always-use-latest-compatibility-date.deployment-configs-preview-analytics-engine-datasets.deployment-configs-preview-browsers.deployment-configs-preview-build-image-major-version.deployment-configs-preview-compatibility-date.deployment-configs-preview-compatibility-flags.deployment-configs-preview-d1-databases.deployment-configs-preview-durable-object-namespaces.deployment-configs-preview-env-vars.deployment-configs-preview-fail-open.deployment-configs-preview-hyperdrive-bindings.deployment-configs-preview-kv-namespaces.deployment-configs-preview-limits-cpu-ms.deployment-configs-preview-mtls-certificates.deployment-configs-preview-placement-mode.deployment-configs-preview-queue-producers.deployment-configs-preview-r2-buckets.deployment-configs-preview-services.deployment-configs-preview-usage-model.deployment-configs-preview-vectorize-bindings.deployment-configs-preview-wrangler-config-hash.deployment-configs-production-ai-bindings.deployment-configs-production-always-use-latest-compatibility-date.deployment-configs-production-analytics-engine-datasets.deployment-configs-production-browsers.deployment-configs-production-build-image-major-version.deployment-configs-production-compatibility-date.deployment-configs-production-compatibility-flags.deployment-configs-production-d1-databases.deployment-configs-production-durable-object-namespaces.deployment-configs-production-env-vars.deployment-configs-production-fail-open.deployment-configs-production-hyperdrive-bindings.deployment-configs-production-kv-namespaces.deployment-configs-production-limits-cpu-ms.deployment-configs-production-mtls-certificates.deployment-configs-production-placement-mode.deployment-configs-production-queue-producers.deployment-configs-production-r2-buckets.deployment-configs-production-services.deployment-configs-production-usage-model.deployment-configs-production-vectorize-bindings.deployment-configs-production-wrangler-config-hash`.split(`.`)).some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:x,handler:async e=>d({command:`pages create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(b,{body:r,account_id:n}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await g(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Creating`,async()=>t.send(b,{body:i,account_id:n}));c(d,{successLabel:`Created`})})};var C={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function w(e){return e.usage(`$0 pages delete <project-name>
|
|
8
|
+
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`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)`}).check(e=>{let t=[`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:x,handler:async e=>d({command:`pages create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(b,{body:r,account_id:n}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await g(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Creating`,async()=>t.send(b,{body:i,account_id:n}));c(d,{successLabel:`Created`})})};var C={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function w(e){return e.usage(`$0 pages delete <project-name>
|
|
9
9
|
|
|
10
10
|
Permanently delete a Cloudflare Pages project and its deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 T={command:`delete <project-name>`,describe:`Delete a Cloudflare Pages project`,builder:w,handler:async e=>d({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(C,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})};var E={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,pathParams:[`account_id`,`project_name`],body:`form`};function D(e){return e.usage(`$0 pages deployments create <project-name>
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ Retry validation for a custom domain attached to a Cloudflare Pages project.`).p
|
|
|
35
35
|
|
|
36
36
|
Update the build, deployment, source, or environment settings for a Cloudflare Pages project. To delete an environment variable, set its key to \`null\`.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
37
37
|
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
38
|
-
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`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)`}).check(e=>{if((/* @__PURE__ */ `deployment-configs-preview-ai-bindings.deployment-configs-preview-always-use-latest-compatibility-date.deployment-configs-preview-analytics-engine-datasets.deployment-configs-preview-browsers.deployment-configs-preview-build-image-major-version.deployment-configs-preview-compatibility-date.deployment-configs-preview-compatibility-flags.deployment-configs-preview-d1-databases.deployment-configs-preview-durable-object-namespaces.deployment-configs-preview-env-vars.deployment-configs-preview-fail-open.deployment-configs-preview-hyperdrive-bindings.deployment-configs-preview-kv-namespaces.deployment-configs-preview-limits-cpu-ms.deployment-configs-preview-mtls-certificates.deployment-configs-preview-placement-mode.deployment-configs-preview-queue-producers.deployment-configs-preview-r2-buckets.deployment-configs-preview-services.deployment-configs-preview-usage-model.deployment-configs-preview-vectorize-bindings.deployment-configs-preview-wrangler-config-hash.deployment-configs-production-ai-bindings.deployment-configs-production-always-use-latest-compatibility-date.deployment-configs-production-analytics-engine-datasets.deployment-configs-production-browsers.deployment-configs-production-build-image-major-version.deployment-configs-production-compatibility-date.deployment-configs-production-compatibility-flags.deployment-configs-production-d1-databases.deployment-configs-production-durable-object-namespaces.deployment-configs-production-env-vars.deployment-configs-production-fail-open.deployment-configs-production-hyperdrive-bindings.deployment-configs-production-kv-namespaces.deployment-configs-production-limits-cpu-ms.deployment-configs-production-mtls-certificates.deployment-configs-production-placement-mode.deployment-configs-production-queue-producers.deployment-configs-production-r2-buckets.deployment-configs-production-services.deployment-configs-production-usage-model.deployment-configs-production-vectorize-bindings.deployment-configs-production-wrangler-config-hash`.split(`.`)).some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const xe={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:be,handler:async e=>d({command:`pages edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Updating`,async()=>t.send(Z,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Updated`});return}let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Updating`,async()=>t.send(Z,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Updated`})})};var Se={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function Ce(e){return e.usage(`$0 pages get <project-name>
|
|
38
|
+
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`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)`}).check(e=>{let t=[`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const xe={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:be,handler:async e=>d({command:`pages edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Updating`,async()=>t.send(Z,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Updated`});return}let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Updating`,async()=>t.send(Z,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Updated`})})};var Se={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function Ce(e){return e.usage(`$0 pages get <project-name>
|
|
39
39
|
|
|
40
40
|
Retrieve the configuration and deployment settings for a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <project-name>`,describe:`Get a Cloudflare Pages project`,builder:Ce,handler:async e=>d({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(Se,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var Te={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects`,query:[`page`,`per_page`]};function Ee(e){return e.usage(`$0 pages list
|
|
41
41
|
|
|
@@ -45,4 +45,4 @@ Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Gi
|
|
|
45
45
|
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
46
46
|
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`type`,e=>h(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Repository and deployment settings for connecting a Git repository to a Pages project.`})}const Oe={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:$,handler:async e=>d({command:`pages source connect`,classification:{safeFlags:[`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(Q,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}if(e[`source-config-deployments-enabled`]===void 0)throw Error(`--source-config-deployments-enabled is required (or pass --body with this field set).`);if(e[`source-config-owner`]===void 0&&(e[`source-config-owner`]=await g(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await g(`source-config-owner-id`,`The owner ID of the repository.`)),e[`source-config-path-excludes`]===void 0)throw Error(`--source-config-path-excludes is required (or pass --body with this field set).`);if(e[`source-config-path-includes`]===void 0)throw Error(`--source-config-path-includes is required (or pass --body with this field set).`);if(e[`source-config-pr-comments-enabled`]===void 0)throw Error(`--source-config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-excludes`]===void 0)throw Error(`--source-config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-includes`]===void 0)throw Error(`--source-config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`source-config-preview-deployment-setting`]===void 0&&(e[`source-config-preview-deployment-setting`]=await _(`source-config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`source-config-production-branch`]===void 0&&(e[`source-config-production-branch`]=await g(`source-config-production-branch`,`The production branch of the repository.`)),e[`source-config-production-deployments-enabled`]===void 0)throw Error(`--source-config-production-deployments-enabled is required (or pass --body with this field set).`);e[`source-config-repo-id`]===void 0&&(e[`source-config-repo-id`]=await g(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await g(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await _(`type`,`The source control management provider.`,[`github`,`gitlab`]));let i=m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),d=await u(`Creating`,async()=>t.send(Q,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`};function Ae(e){return e.usage(`$0 pages source disconnect <project-name>
|
|
47
47
|
|
|
48
|
-
Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-
|
|
48
|
+
Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-C2FVMd1b.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(re).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,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,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ee(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
3
|
|
|
4
4
|
Creates the pay-per-crawl config for a zone.`).option(`bot-overrides`,{type:`string`,description:`The bot_overrides field. Provide as a JSON object or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:ee,handler:async e=>l({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]):d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}])});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}]),i=await c(`Creating`,async()=>t.send(h,{body:n,zone_id:r}));o(i,{successLabel:`Created`});return}if(e[`bot-overrides`]===void 0)throw Error(`--bot-overrides is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let a=p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]),l=await c(`Creating`,async()=>t.send(h,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
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,i as a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{t as u}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-D0dXwuME.mjs";var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/enabled-domains`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
3
3
|
|
|
4
4
|
Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`list`,describe:`List enabled Pay Per Use domains`,builder:ee,handler:async e=>u({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(y,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ne={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/operator/configuration`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
|
|
5
5
|
|
|
@@ -21,7 +21,9 @@ Lists a paginated set of outstanding pay-per-use publisher price proposals for a
|
|
|
21
21
|
|
|
22
22
|
Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const q={command:`submit`,describe:`Submit a participant usage report`,builder:K,handler:async e=>u({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:e.body});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file){let t=h(e.file),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:t,headers:{"Content-Type":`application/jsonl`}}));s(r,{successLabel:`Created`})}else if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:t,headers:{"Content-Type":`application/jsonl`}}));s(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},J={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/pay-per-use/usage-stats`,query:[`since`,`until`,`page`,`per_page`],errors:{400:`BadRequestError`,403:`ForbiddenError`,500:`InternalServerError`}};function X(e){return e.usage(`$0 pay-per-use usage-stats get-account
|
|
23
23
|
|
|
24
|
-
Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share
|
|
24
|
+
Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share.
|
|
25
|
+
|
|
26
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:X,handler:async e=>u({command:`pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(Y,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})},ae={command:`usage-stats`,describe:`Operations for usage-stats`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-use/can_be_enabled`,errors:{403:`ForbiddenError`}};function se(e){return e.usage(`$0 pay-per-use zones get-can-be-enabled
|
|
25
27
|
|
|
26
28
|
Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:se,handler:async e=>u({command:`pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf pay-per-use zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(oe,{zone_id:n}));s(i,{successLabel:`Loaded`})})};var Z={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-use/configuration`,errors:{403:`ForbiddenError`}};function le(e){return e.usage(`$0 pay-per-use zones get-configuration
|
|
27
29
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
|
|
3
3
|
|
|
4
4
|
Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).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 v={command:`create`,describe:`Create Pipeline`,builder:_,handler:async e=>c({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Pipeline.`)),e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}),h=await s(`Creating`,async()=>c.send(g,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function b(e){return e.usage(`$0 pipelines delete <pipeline-id>
|
|
5
5
|
|
|
@@ -15,11 +15,11 @@ Get Pipeline details.`).positional(`pipeline-id`,{type:`string`,description:`Spe
|
|
|
15
15
|
|
|
16
16
|
[DEPRECATED] List, filter, and paginate pipelines in an account. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`search`,{type:`string`,description:`Specifies the prefix of pipeline name to search.`}).option(`page`,{type:`string`,description:`Specifies which page to retrieve.`}).option(`per-page`,{type:`string`,description:`Specifies the number of pipelines per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`legacy-list`,describe:`[DEPRECATED] List Pipelines`,builder:j,handler:async e=>c({command:`pipelines legacy-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,body:`json`};function P(e){return e.usage(`$0 pipelines legacy-update <pipeline-name>
|
|
17
17
|
|
|
18
|
-
[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`]}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:P,handler:async e=>c({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:h,pipeline_name:e[`pipeline-name`]}));a(n,{successLabel:`Updated`});return}if(e[`destination-
|
|
18
|
+
[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`]}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].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 --destination-credentials-* flag is set`)}return!0})}const F={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:P,handler:async e=>c({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:h,pipeline_name:e[`pipeline-name`]}));a(n,{successLabel:`Updated`});return}if(e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}),_=await s(`Updating`,async()=>c.send(N,{body:g,account_id:h,pipeline_name:e[`pipeline-name`]}));a(_,{successLabel:`Updated`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,query:[`page`,`per_page`,`name`]};function L(e){return e.usage(`$0 pipelines list
|
|
19
19
|
|
|
20
20
|
List/Filter Pipelines in Account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`name`,{type:`string`,description:`Filters pipelines by name (case-insensitive substring).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List Pipelines`,builder:L,handler:async e=>c({command:`pipelines list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],name:e.name};if(e.dryRun){let e=await r();o({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(I,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,body:`json`};function B(e){return e.usage(`$0 pipelines sinks create
|
|
21
21
|
|
|
22
|
-
Create a new Sink.`).option(`sink-config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`sink-config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`sink-config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).coerce(`sink-config-file-naming-strategy`,e=>f(e,`sink-config-file-naming-strategy`,`text`)).option(`sink-config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`sink-config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`sink-config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`sink-config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`sink-config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`sink-config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`sink-config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`sink-config-namespace`,{type:`string`,description:`Table namespace`}).option(`sink-config-table-name`,{type:`string`,description:`Table name`}).option(`sink-config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).coerce(`type`,e=>f(e,`type`,`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)`}).conflicts(`sink-config-credentials-access-key-id`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-credentials-secret-access-key`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-file-naming-prefix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-file-naming-strategy`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-file-naming-suffix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-jurisdiction`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-partitioning-time-pattern`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-path`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-namespace`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).conflicts(`sink-config-table-name`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-table-name`,[`sink-config-token`]).conflicts(`sink-config-token`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-token`,[`sink-config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{if([`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`,`sink-config-rolling-policy-file-size-bytes`,`sink-config-rolling-policy-inactivity-seconds`,`sink-config-rolling-policy-interval-seconds`,`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`].some(t=>e[t]!==void 0)){let t={"sink-config-credentials-access-key-id":[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`],"sink-config-credentials-secret-access-key":[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]},n=[`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0}).check(e=>{if([`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0)){let t=[`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 --format-* flag is set`)}return!0})}const V={command:`create`,describe:`Create Sink`,builder:B,handler:async e=>c({command:`pipelines sinks create`,classification:{safeFlags:[`sink-config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}):u(e.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(z,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Defines the name of the Sink.`)),e.type===void 0&&(e.type=await m(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let g=d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}),_=await s(`Creating`,async()=>c.send(z,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function U(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
22
|
+
Create a new Sink.`).option(`sink-config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`sink-config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`sink-config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).coerce(`sink-config-file-naming-strategy`,e=>f(e,`sink-config-file-naming-strategy`,`text`)).option(`sink-config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`sink-config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`sink-config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`sink-config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`sink-config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`sink-config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`sink-config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`sink-config-namespace`,{type:`string`,description:`Table namespace`}).option(`sink-config-table-name`,{type:`string`,description:`Table name`}).option(`sink-config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).coerce(`type`,e=>f(e,`type`,`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)`}).conflicts(`sink-config-credentials-access-key-id`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-access-key-id`,[`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-credentials-secret-access-key`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-secret-access-key`,[`sink-config-credentials-access-key-id`]).conflicts(`sink-config-file-naming-prefix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-prefix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-strategy`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-strategy`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-suffix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-suffix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-jurisdiction`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-jurisdiction`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-partitioning-time-pattern`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-partitioning-time-pattern`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-path`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-path`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-namespace`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-namespace`,[`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-table-name`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-table-name`,[`sink-config-token`]).conflicts(`sink-config-token`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-token`,[`sink-config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`,`sink-config-rolling-policy-file-size-bytes`,`sink-config-rolling-policy-inactivity-seconds`,`sink-config-rolling-policy-interval-seconds`,`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`sink-config-account-id`,`sink-config-bucket`].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 --config-* flag is set`)}return!0}).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`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 --format-* flag is set`)}return!0})}const V={command:`create`,describe:`Create Sink`,builder:B,handler:async e=>c({command:`pipelines sinks create`,classification:{safeFlags:[`sink-config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}):u(e.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(z,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Defines the name of the Sink.`)),e.type===void 0&&(e.type=await m(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let g=d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}),_=await s(`Creating`,async()=>c.send(z,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function U(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
23
23
|
|
|
24
24
|
Delete Sink in Account.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,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 W={command:`delete <sink-id>`,describe:`Delete Sink`,builder:U,handler:async e=>c({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(H,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function G(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ Get Sink Details.`).positional(`sink-id`,{type:`string`,description:`Specifies t
|
|
|
27
27
|
|
|
28
28
|
List/Filter Sinks in Account.`).option(`pipeline-id`,{type:`string`,description:`Pipeline ID`}).option(`name`,{type:`string`,description:`Filters sinks by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts sinks by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List Sinks`,builder:J,handler:async e=>c({command:`pipelines sinks list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let c={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(q,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},ae={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(V).command(W).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,body:`json`};function oe(e){return e.usage(`$0 pipelines streams create
|
|
29
29
|
|
|
30
|
-
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`format-decimal-encoding`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-compression`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{
|
|
30
|
+
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`format-decimal-encoding`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-compression`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`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 --format-* flag is set`)}return!0}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`http-enabled`].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 --http-* flag is set`)}return!0})}const se={command:`create`,describe:`Create Stream`,builder:oe,handler:async e=>c({command:`pipelines streams create`,classification:{safeFlags:[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`http-authentication`,`http-enabled`,`schema-inferred`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(X,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Stream.`));let h=d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(X,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function le(e){return e.usage(`$0 pipelines streams delete <stream-id>
|
|
31
31
|
|
|
32
32
|
Delete Stream in Account.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,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 ue={command:`delete <stream-id>`,describe:`Delete Stream`,builder:le,handler:async e=>c({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function fe(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
33
33
|
|
|
@@ -35,6 +35,6 @@ Get Stream Details.`).positional(`stream-id`,{type:`string`,description:`Specifi
|
|
|
35
35
|
|
|
36
36
|
List/Filter Streams in Account.`).option(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`}).option(`name`,{type:`string`,description:`Filters streams by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts streams by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Streams`,builder:he,handler:async e=>c({command:`pipelines streams list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let c={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(me,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`,body:`json`};function ge(e){return e.usage(`$0 pipelines streams update <stream-id>
|
|
37
37
|
|
|
38
|
-
Update a Stream.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{
|
|
38
|
+
Update a Stream.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`http-enabled`].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 --http-* flag is set`)}return!0})}const _e={command:`update <stream-id>`,describe:`Update Stream`,builder:ge,handler:async e=>c({command:`pipelines streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Q,{body:t,account_id:l,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let f=d({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),p=await s(`Updating`,async()=>c.send(Q,{body:f,account_id:l,stream_id:e[`stream-id`]}));a(p,{successLabel:`Updated`})})},ve={command:`streams`,describe:`Inbound data streams that feed events into a pipeline for processing`,builder:e=>e.command(se).command(ue).command(pe).command(Z).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/validate_sql`,body:`json`,errors:{422:`UnprocessableEntityError`}};function ye(e){return e.usage(`$0 pipelines validate-sql
|
|
39
39
|
|
|
40
40
|
Validates that the Pipelines SQL is correct.`).option(`sql`,{type:`string`,description:`Specifies SQL to validate.`}).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 be={command:`validate-sql`,describe:`Validate SQL`,builder:ye,handler:async e=>c({command:`pipelines validate-sql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/validate_sql`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send($,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL to validate.`));let m=d({sql:f(e.sql,`sql`,`text`)}),h=await s(`Creating`,async()=>c.send($,{body:m,account_id:l}));a(h,{successLabel:`Created`})})},xe={command:`pipelines`,describe:`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,builder:e=>e.command(v).command(ee).command(re).command(C).command(E).command(k).command(M).command(F).command(R).command(be).command(ae).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{i as e,n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,s as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";function f(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the detection `mode`, whether to `show_interstitial`, and the ordered list of `rules`.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Zone Precursor Config`,builder:f,handler:async s=>o({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},s,async()=>{let o={};if(s[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(s[`cloudflare-version`])),s.dryRun){i({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`none`});return}let c=await t(s);s.zoneId=await n({zone:s.zone},c,{quiet:s.quiet});let l=await a(`Loading`,async()=>e(c,`GET`,`/zones/${s.zoneId}/precursor`,{headers:Object.keys(o).length>0?o:void 0}));r(l,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `mode` controls whether Precursor detection is off, monitoring, or armed. `show_interstitial` controls the zone-level response when armed. `rules` is the ordered list of overrides for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all rules. - At least one of `mode`, `show_interstitial`, or `rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `show_interstitial` is required and controls the response for requests that match that rule. - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`detection-mode`,{type:`string`,description:"Controls Precursor detection for the zone. `off` disables detection,\n`monitor` records detections without affecting bot scores, and `arm`\nallows detections to affect bot scores.\n",choices:[`off`,`monitor`,`arm`]}).coerce(`detection-mode`,e=>d(e,`detection-mode`,`text`)).option(`rules`,{type:`string`,description:`The ordered list of Precursor rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).option(`show-interstitial`,{type:`boolean`,description:`Whether Precursor shows an interstitial when it takes action on a
|
|
3
|
+
request.
|
|
4
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`update`,describe:`Update Zone Precursor Config`,builder:m,handler:async d=>o({command:`precursor update`,classification:{safeFlags:[`detection-mode`,`show-interstitial`,`dry-run`]}},d,async()=>{let o={};if(d[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(d[`cloudflare-version`])),d.dryRun){i({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({mode:d[`detection-mode`],rules:s(d.rules,`rules`),show_interstitial:d[`show-interstitial`]}):c(d.body)});return}let f=await t(d);if(d.zoneId=await n({zone:d.zone},f,{quiet:d.quiet}),d.body){let t=c(d.body),n=await a(`Updating`,async()=>e(f,`PUT`,`/zones/${d.zoneId}/precursor`,{body:t,headers:Object.keys(o).length>0?o:void 0}));r(n,{successLabel:`Updated`});return}let p={};d[`detection-mode`]!==void 0&&l(p,[`mode`],d[`detection-mode`]),d.rules!==void 0&&l(p,[`rules`],s(d.rules,`rules`)),d[`show-interstitial`]!==void 0&&l(p,[`show_interstitial`],d[`show-interstitial`]);let m=await a(`Updating`,async()=>e(f,`PUT`,`/zones/${d.zoneId}/precursor`,{body:p,headers:Object.keys(o).length>0?o:void 0}));r(m,{successLabel:`Updated`})})},g={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|